]> granicus.if.org Git - php/commitdiff
substr() fix for PHP4 as well
authorRasmus Lerdorf <rasmus@php.net>
Wed, 12 May 1999 12:43:03 +0000 (12:43 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Wed, 12 May 1999 12:43:03 +0000 (12:43 +0000)
ext/standard/string.c

index d809349bb64676b74da927770e4901a10e748369..012de6a6115d9b88781adb191fc4f0acfa28bdc6 100644 (file)
@@ -829,7 +829,7 @@ void php3_substr(INTERNAL_FUNCTION_PARAMETERS)
        if ((f + l) < (int)string->value.str.len) {
                string->value.str.val[f + l] = '\0';
        }
-       RETVAL_STRING(string->value.str.val + f,1);
+       RETVAL_STRINGL(string->value.str.val + f, l, 1);
 }
 /* }}} */