]> granicus.if.org Git - php/commitdiff
use correct pointer in the math
authorAntony Dovgal <tony2001@php.net>
Mon, 1 Feb 2016 13:32:06 +0000 (16:32 +0300)
committerAntony Dovgal <tony2001@php.net>
Mon, 1 Feb 2016 13:32:06 +0000 (16:32 +0300)
ext/standard/array.c

index 6e30eae8a1b08d6fb10fcddab868c48e03f953e2..ad447cc80857168622284c058afce8921b0a0832 100644 (file)
@@ -268,7 +268,7 @@ static int php_array_key_compare_string(const void *a, const void *b) /* {{{ */
                l2 = s->key->len;
        } else {
                s2 = zend_print_long_to_buf(buf2 + sizeof(buf2) - 1, s->h);
-               l2 = buf2 + sizeof(buf2) - 1 - s1;
+               l2 = buf2 + sizeof(buf2) - 1 - s2;
        }
        return zend_binary_strcmp(s1, l1, s2, l2);
 }