fix failure to terminate loop properly

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34085 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-10-28 18:17:36 +00:00
parent 22289342b4
commit a86fa6f9b9

View file

@ -5524,15 +5524,12 @@ static NSFileManager *fm = nil;
searchRange.location = range.location + byLen; searchRange.location = range.location + byLen;
searchRange.length = newEnd - searchRange.location; searchRange.length = newEnd - searchRange.location;
} }
if (searchRange.length > 0) /* We replaced something and now need to scan again.
{ * As we modified the receiver, we must refresh the
/* We replaced something and now need to scan again. * method implementation for searching.
* As we modified the receiver, we must refresh the */
* method implementation for searching. func = GSPrivateRangeOfString(self, replace);
*/ range = (*func)(self, replace, opts, searchRange);
func = GSPrivateRangeOfString(self, replace);
range = (*func)(self, replace, opts, searchRange);
}
} }
while (range.length > 0); while (range.length > 0);
} }