mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix for failure to check insertion point is at an existing item.
This commit is contained in:
parent
7c68c30928
commit
9bbcd75d16
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2017-11-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSArray.m: Fix for bug reported on github by zneak.
|
||||
|
||||
2017-11-04 Fred Kiefer <fredkiefer@gmx.de>
|
||||
|
||||
* Source/GSLocale.m: Protect against
|
||||
|
|
|
@ -1204,6 +1204,10 @@ compare(id elem1, id elem2, void* context)
|
|||
index--;
|
||||
}
|
||||
}
|
||||
if (index >= NSMaxRange(range))
|
||||
{
|
||||
return NSNotFound;
|
||||
}
|
||||
/*
|
||||
* For a search from the left, we'd have the correct index anyways. Check
|
||||
* whether it's equal to the key and return NSNotFound otherwise
|
||||
|
|
Loading…
Reference in a new issue