mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
zend_hash_do_resize: fix compacting condition
nNumUsed should always be greater or equal to nNumOfElements so original condition is never true and arrays are always doubled in size and compaction is never triggered
This commit is contained in:
parent
60d491c970
commit
c462ff7ac2
1 changed files with 1 additions and 1 deletions
|
@ -564,7 +564,7 @@ static void zend_hash_do_resize(HashTable *ht)
|
|||
|
||||
IS_CONSISTENT(ht);
|
||||
|
||||
if (ht->nNumUsed < ht->nNumOfElements) {
|
||||
if (ht->nNumUsed > ht->nNumOfElements) {
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
zend_hash_rehash(ht);
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue