Fix index issue in #removeSegments().

This commit is contained in:
Jürg Lehni 2011-04-28 19:03:05 +01:00
parent 121ec5a93f
commit d098c6e8b2

View file

@ -116,7 +116,7 @@ var Path = this.Path = PathItem.extend({
// TODO: Port back to Sg
removeSegments: function(from, to) {
var i = Base.pick(to, this._segments.length),
var i = Base.pick(to, this._segments.length - 1),
from = from || 0;
while (i >= from)
this.removeSegment(i--);