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:
Richard Frith-MacDonald 2011-10-28 18:17:36 +00:00
parent d3a44df7f7
commit 58389dd312

View file

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