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

index d066b6de71b52b00c7635a67054293fc90993c55..137e3b1053ee3fdc8825cd6a7e67ac6314a04ac6 100644 (file)
@@ -6492,7 +6492,7 @@ PHP_FUNCTION(substr_compare)
                offset = s1_len + offset;
        }
 
-       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;
        }