Fixes testShiftIndexesStartingAtIndex. Upward shifting no longer throws.

This commit is contained in:
aburkhalter authored and Ross Boucher committed 2010-03-12 18:53:58 -08:00
1 parent dc9d79bc3d
commit b9427f84ae
1 file changed
+4 -1
+4 -1
View File
@@ -739,12 +739,15 @@
shifts = [];
for (; j < count; ++j)
{
[shifts addObject:_ranges[j]];
_count -= _ranges[j].length
}
if ((j = i + 1) < count)
{
[_ranges removeObjectsInRange:CPMakeRange(j, count - j)];
for (j = 0, count = shifts.length; j < count; ++j)
[self addIndexesInRange:shifts[j]];
}