Skip to content

Commit 7f2261d

Browse files
committed
Fix HT_ASSERT ht->nInternalPointer checks
The & was on the wrong side...
1 parent 127db5a commit 7f2261d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Zend/zend_hash.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex(HashTable *ht, H
19671967
uint32_t idx;
19681968

19691969
IS_CONSISTENT(ht);
1970-
HT_ASSERT(ht->nInternalPointer != &pos || GC_REFCOUNT(ht) == 1);
1970+
HT_ASSERT(&ht->nInternalPointer != pos || GC_REFCOUNT(ht) == 1);
19711971

19721972
for (idx = 0; idx < ht->nNumUsed; idx++) {
19731973
if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) {
@@ -1987,7 +1987,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_end_ex(HashTable *ht, Has
19871987
uint32_t idx;
19881988

19891989
IS_CONSISTENT(ht);
1990-
HT_ASSERT(ht->nInternalPointer != &pos || GC_REFCOUNT(ht) == 1);
1990+
HT_ASSERT(&ht->nInternalPointer != pos || GC_REFCOUNT(ht) == 1);
19911991

19921992
idx = ht->nNumUsed;
19931993
while (idx > 0) {
@@ -2006,7 +2006,7 @@ ZEND_API int ZEND_FASTCALL zend_hash_move_forward_ex(HashTable *ht, HashPosition
20062006
uint32_t idx = *pos;
20072007

20082008
IS_CONSISTENT(ht);
2009-
HT_ASSERT(ht->nInternalPointer != &pos || GC_REFCOUNT(ht) == 1);
2009+
HT_ASSERT(&ht->nInternalPointer != pos || GC_REFCOUNT(ht) == 1);
20102010

20112011
if (idx != HT_INVALID_IDX) {
20122012
while (1) {
@@ -2030,7 +2030,7 @@ ZEND_API int ZEND_FASTCALL zend_hash_move_backwards_ex(HashTable *ht, HashPositi
20302030
uint32_t idx = *pos;
20312031

20322032
IS_CONSISTENT(ht);
2033-
HT_ASSERT(ht->nInternalPointer != &pos || GC_REFCOUNT(ht) == 1);
2033+
HT_ASSERT(&ht->nInternalPointer != pos || GC_REFCOUNT(ht) == 1);
20342034

20352035
if (idx != HT_INVALID_IDX) {
20362036
while (idx > 0) {

0 commit comments

Comments
 (0)