mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fixed implementation of the ([-rangeOfCharacterFromSet:options:range:]) method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2848 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2423aef513
commit
86f2dc61dc
1 changed files with 2 additions and 2 deletions
|
@ -722,14 +722,14 @@ handle_printf_atsign (FILE *stream,
|
|||
|
||||
if ((mask & NSBackwardsSearch) == NSBackwardsSearch)
|
||||
{
|
||||
start = NSMaxRange(aRange); stop = aRange.location; step = -1;
|
||||
start = NSMaxRange(aRange)-1; stop = aRange.location-1; step = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
start = aRange.location; stop = NSMaxRange(aRange); step = 1;
|
||||
}
|
||||
range.length = 0;
|
||||
for (i = start; i < stop; i+=step)
|
||||
for (i = start; i != stop; i+=step)
|
||||
{
|
||||
unichar letter = [self characterAtIndex:i];
|
||||
if ([aSet characterIsMember:letter])
|
||||
|
|
Loading…
Reference in a new issue