@@ -3252,7 +3252,8 @@ static void php_splice(HashTable *in_hash, zend_long offset, zend_long length, H
32523252
32533253 /* If hash for removed entries exists, go until offset+length and copy the entries to it */
32543254 if (removed != NULL ) {
3255- for ( ; pos - offset < length && idx < in_hash -> nNumUsed ; idx ++ , entry ++ ) {
3255+ for ( ; pos - offset < length && idx < in_hash -> nNumUsed ; idx ++ ) {
3256+ entry = in_hash -> arPacked + idx ;
32563257 if (Z_TYPE_P (entry ) == IS_UNDEF ) continue ;
32573258 pos ++ ;
32583259 Z_TRY_ADDREF_P (entry );
@@ -3262,7 +3263,8 @@ static void php_splice(HashTable *in_hash, zend_long offset, zend_long length, H
32623263 } else { /* otherwise just skip those entries */
32633264 zend_long pos2 = pos ;
32643265
3265- for ( ; pos2 - offset < length && idx < in_hash -> nNumUsed ; idx ++ , entry ++ ) {
3266+ for ( ; pos2 - offset < length && idx < in_hash -> nNumUsed ; idx ++ ) {
3267+ entry = in_hash -> arPacked + idx ;
32663268 if (Z_TYPE_P (entry ) == IS_UNDEF ) continue ;
32673269 pos2 ++ ;
32683270 zend_hash_packed_del_val (in_hash , entry );
@@ -3317,7 +3319,8 @@ static void php_splice(HashTable *in_hash, zend_long offset, zend_long length, H
33173319
33183320 /* If hash for removed entries exists, go until offset+length and copy the entries to it */
33193321 if (removed != NULL ) {
3320- for ( ; pos - offset < length && idx < in_hash -> nNumUsed ; idx ++ , p ++ ) {
3322+ for ( ; pos - offset < length && idx < in_hash -> nNumUsed ; idx ++ ) {
3323+ p = in_hash -> arData + idx ;
33213324 if (Z_TYPE (p -> val ) == IS_UNDEF ) continue ;
33223325 pos ++ ;
33233326 entry = & p -> val ;
@@ -3332,7 +3335,8 @@ static void php_splice(HashTable *in_hash, zend_long offset, zend_long length, H
33323335 } else { /* otherwise just skip those entries */
33333336 zend_long pos2 = pos ;
33343337
3335- for ( ; pos2 - offset < length && idx < in_hash -> nNumUsed ; idx ++ , p ++ ) {
3338+ for ( ; pos2 - offset < length && idx < in_hash -> nNumUsed ; idx ++ ) {
3339+ p = in_hash -> arData + idx ;
33363340 if (Z_TYPE (p -> val ) == IS_UNDEF ) continue ;
33373341 pos2 ++ ;
33383342 zend_hash_del_bucket (in_hash , p );
@@ -3350,7 +3354,8 @@ static void php_splice(HashTable *in_hash, zend_long offset, zend_long length, H
33503354 }
33513355
33523356 /* Copy the remaining input hash entries to the output hash */
3353- for ( ; idx < in_hash -> nNumUsed ; idx ++ , p ++ ) {
3357+ for ( ; idx < in_hash -> nNumUsed ; idx ++ ) {
3358+ p = in_hash -> arData + idx ;
33543359 if (Z_TYPE (p -> val ) == IS_UNDEF ) continue ;
33553360 entry = & p -> val ;
33563361 if (p -> key == NULL ) {
0 commit comments