]> granicus.if.org Git - php/commitdiff
fix datatype mismatches
authorAnatol Belski <ab@php.net>
Wed, 25 Mar 2015 10:15:59 +0000 (11:15 +0100)
committerAnatol Belski <ab@php.net>
Wed, 25 Mar 2015 14:32:36 +0000 (15:32 +0100)
ext/standard/array.c

index 9ed3671fcba45179f9b15139877424f1b4e004e5..cd6e0202163b340cc664a08bdb03a32fafc1a5e0 100644 (file)
@@ -1874,7 +1874,8 @@ static void php_array_data_shuffle(zval *array) /* {{{ */
        uint32_t idx, j, n_elems;
        Bucket *p, temp;
        HashTable *hash;
-       zend_long rnd_idx, n_left;
+       zend_long rnd_idx;
+       uint32_t n_left;
 
        n_elems = zend_hash_num_elements(Z_ARRVAL_P(array));
 
@@ -1929,7 +1930,7 @@ static void php_array_data_shuffle(zval *array) /* {{{ */
                                temp = hash->arData[n_left];
                                hash->arData[n_left] = hash->arData[rnd_idx];
                                hash->arData[rnd_idx] = temp;
-                               zend_hash_iterators_update(hash, rnd_idx, n_left);
+                               zend_hash_iterators_update(hash, (uint32_t)rnd_idx, n_left);
                        }
                }
        }