From 149dd625bef9a76a5ac5d7652bab7d0b490b3f9c Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 21 Feb 2007 14:11:00 +0000 Subject: [PATCH] Special case for last iteration --- Zend/zend_hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index a5faafefed..c3e0ae4394 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -1025,7 +1025,9 @@ ZEND_API int zend_hash_get_pointer(HashTable *ht, HashPointer *ptr) ZEND_API int zend_hash_set_pointer(HashTable *ht, const HashPointer *ptr) { - if (ht->pInternalPointer != ptr->pos) { + if (ptr->pos == NULL) { + ht->pInternalPointer = NULL; + } else if (ht->pInternalPointer != ptr->pos) { Bucket *p; IS_CONSISTENT(ht); -- 2.50.1