From b264e96497f3d38faf24ede04d260b4aef0181be Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sat, 15 Mar 2014 22:17:55 +0800 Subject: [PATCH] Fixed bug codes in SplFileInfo::getExtension --- ext/spl/spl_directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.50.1