Correct result of NSRegularExpression -rangeOfFirstMatchInString:...

When no match is found location must be set to NSNotFound.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34348 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wlux 2011-12-23 14:59:14 +00:00
parent 42ffcb55bf
commit f7afd83ded
2 changed files with 7 additions and 2 deletions

View file

@ -491,7 +491,7 @@ prepareResult(NSRegularExpression *regex,
options: (NSMatchingOptions)opts
range: (NSRange)range
{
__block NSRange r;
__block NSRange r = {NSNotFound, 0};
opts &= ~NSMatchingReportProgress;
opts &= ~NSMatchingReportCompletion;
@ -623,7 +623,7 @@ prepareResult(NSRegularExpression *regex,
options: (NSMatchingOptions)opts
range: (NSRange)range
{
NSRange result = {0,0};
NSRange result = {NSNotFound, 0};
FAKE_BLOCK_HACK(result,
{