mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
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:
parent
42ffcb55bf
commit
f7afd83ded
2 changed files with 7 additions and 2 deletions
|
@ -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,
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue