]> granicus.if.org Git - php/commitdiff
MFH: add brackets and clarity
authorAntony Dovgal <tony2001@php.net>
Tue, 14 Mar 2006 15:15:22 +0000 (15:15 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 14 Mar 2006 15:15:22 +0000 (15:15 +0000)
ext/standard/string.c

index e12d5d6a0fcbddb9aa1aee0b95740d04d7c112c7..a4cfe6e388e8509f6b918a3d92ee09957a5c6482 100644 (file)
@@ -4884,7 +4884,7 @@ PHP_FUNCTION(substr_compare)
                RETURN_FALSE;
        }
 
-       if (offset + len >= s1_len) {
+       if ((offset + len) >= s1_len) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "The start position cannot exceed initial string length.");
                RETURN_FALSE;
        }