com php-src: small correction to substr: ext/standard/string.c

From: Date: Sat, 17 Aug 2013 11:22:09 +0000
Subject: com php-src: small correction to substr: ext/standard/string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73623@lists.php.net to get a copy of this message
Commit: 99442a301d3ce4c20adc4555f46218583b520303 Author: Anatol Belski <ab@php.net> Sat, 17 Aug 2013 04:22:09 -0700 Parents: 6b067db5fbdc92521e47cf6f05c675b66b671879 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=99442a301d3ce4c20adc4555f46218583b520303 Log: small correction to substr Changed paths: M ext/standard/string.c Diff: diff --git a/ext/standard/string.c b/ext/standard/string.c index 40d6e6c..11e7582 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2239,7 +2239,7 @@ PHP_FUNCTION(substr) f = 0; } - if (l < 0 && ((f > 0 && (l + str_len) < f) || (f < 0 && (l+str_len) > f))) { + if (l < 0 && ((f > 0 && (l + str_len) < f) || (f < 0 && (l+str_len) > -f))) { RETURN_FALSE; }

« previous php.cvs (#73623) next »