Skip to content

Commit 149dd62

Browse files
committed
Special case for last iteration
1 parent d4ccfad commit 149dd62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Zend/zend_hash.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,9 @@ ZEND_API int zend_hash_get_pointer(HashTable *ht, HashPointer *ptr)
10251025

10261026
ZEND_API int zend_hash_set_pointer(HashTable *ht, const HashPointer *ptr)
10271027
{
1028-
if (ht->pInternalPointer != ptr->pos) {
1028+
if (ptr->pos == NULL) {
1029+
ht->pInternalPointer = NULL;
1030+
} else if (ht->pInternalPointer != ptr->pos) {
10291031
Bucket *p;
10301032

10311033
IS_CONSISTENT(ht);

0 commit comments

Comments
 (0)