From: Xinchen Hui Date: Sat, 15 Mar 2014 14:17:55 +0000 (+0800) Subject: Fixed bug codes in SplFileInfo::getExtension X-Git-Tag: POST_PHPNG_MERGE~412^2~311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b264e96497f3d38faf24ede04d260b4aef0181be;p=php Fixed bug codes in SplFileInfo::getExtension --- diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 22fc568fa2..6acfc59a0e 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;