]> 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:33:04 +0000 (16:33 +0300)
ext/standard/array.c

index 4152cc4b1f51239ce56dc52bd3851a9d2c48f258..62279287b60e0ebd2f492dc1ee1833198a853d03 100644 (file)
@@ -270,7 +270,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);
 }