com php-src: Fixed bug codes in SplFileInfo::getExtension: ext/spl/spl_directory.c

From: Date: Sat, 15 Mar 2014 14:17:55 +0000
Subject: com php-src: Fixed bug codes in SplFileInfo::getExtension: ext/spl/spl_directory.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77625@lists.php.net to get a copy of this message
Commit: b264e96497f3d38faf24ede04d260b4aef0181be Author: Xinchen Hui <laruence@gmail.com> Sat, 15 Mar 2014 22:17:55 +0800 Parents: a49781f20d8493bc7719f25ec252951b5bfd6292 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b264e96497f3d38faf24ede04d260b4aef0181be Log: Fixed bug codes in SplFileInfo::getExtension Changed paths: M ext/spl/spl_directory.c Diff: diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 22fc568..6acfc59 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -939,7 +939,7 @@ SPL_METHOD(SplFileInfo, getExtension) p = zend_memrchr(ret->val, '.', ret->len); if (p) { - idx = p - fname; + idx = p - ret->val; RETVAL_STRINGL(ret->val + idx + 1, ret->len - idx - 1); STR_RELEASE(ret); return;

« previous php.cvs (#77625) next »