forked from Mirrors/openclonk
Rope: Fix BackAutoSegmentation
parent
c3eaa66bef
commit
27d72b12ce
|
@ -431,7 +431,7 @@ void C4Rope::DoAutoSegmentation(C4RopeElement* fixed, C4RopeElement* first, C4Re
|
|||
// is shorter than the distance between that element and the fixpoint
|
||||
// and the path between the two is free, then the rope is shortened.
|
||||
unsigned int i = 1;
|
||||
for(C4RopeElement* cur = fixed->Next; cur != NULL; cur = (fixed->Next == first ? cur->Next : cur->Prev), ++i)
|
||||
for(C4RopeElement* cur = first; cur != NULL; cur = (fixed->Next == first ? cur->Next : cur->Prev), ++i)
|
||||
{
|
||||
// We use integers, not reals here, to protect for overflows. This works
|
||||
// because these numbers are large enough so we don't need to take care
|
||||
|
|
Loading…
Reference in New Issue