mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Bugfix - don't raise an exception when attempting to scan a string that is
longer than the characters left in the string being scanned. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3192 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2bcdae97bb
commit
83b1ffe24f
1 changed files with 2 additions and 0 deletions
|
@ -599,6 +599,8 @@
|
|||
[self _skipToNextField];
|
||||
range.location = scanLocation;
|
||||
range.length = [aString length];
|
||||
if (range.location + range.length > len)
|
||||
return NO;
|
||||
range = [string rangeOfString:aString
|
||||
options:caseSensitive ? 0 : NSCaseInsensitiveSearch
|
||||
range:range];
|
||||
|
|
Loading…
Reference in a new issue