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

From: Date: Wed, 16 Oct 2013 10:08:26 +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-73488@lists.php.net to get a copy of this message
Commit: 51ddf600fecfb66368583b6afe4cf85147625350 Author: Anatol Belski <ab@php.net> Sat, 17 Aug 2013 04:22:09 -0700 Parents: df0a28baabc2ff4e3a5d77cc413635429e38d4fd Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=51ddf600fecfb66368583b6afe4cf85147625350 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 fb09f36..5805ab9 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 (#73488) next »