mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 01:01:03 +00:00
fix error replacing strings in a string, and optimise literal strings a bit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34081 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8870a4331f
commit
a4c7e88a11
3 changed files with 42 additions and 3 deletions
|
@ -5524,8 +5524,15 @@ static NSFileManager *fm = nil;
|
|||
searchRange.location = range.location + byLen;
|
||||
searchRange.length = newEnd - searchRange.location;
|
||||
}
|
||||
|
||||
range = (*func)(self, replace, opts, searchRange);
|
||||
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);
|
||||
}
|
||||
}
|
||||
while (range.length > 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue