mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
check for nKeyLength not arKey
This commit is contained in:
parent
6b79bbe842
commit
15d87d2452
@ -2,7 +2,7 @@ PHP 4.0 CHANGE LOG ChangeLog
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
|
||||
??? ?? 1999, Version 4.0 Beta 2
|
||||
- Fixed a bug that prevented uksort() from working correctly (Andrey)
|
||||
- Fixed bugs in uksort() and ksort() sort ordering (Andrey)
|
||||
- Fixed a memory leak when using assignment-op operators with lvalue of type
|
||||
string.
|
||||
- Fixed a problem in inheritence from classes that are defined in include()d
|
||||
|
@ -634,11 +634,11 @@ static int array_key_compare(const void *a, const void *b)
|
||||
first = *((Bucket **) a);
|
||||
second = *((Bucket **) b);
|
||||
|
||||
if (first->arKey == NULL && second->arKey == NULL) {
|
||||
if (first->nKeyLength == 0 && second->nKeyLength == 0) {
|
||||
return (first->h - second->h);
|
||||
} else if (first->arKey == NULL) {
|
||||
} else if (first->nKeyLength == 0) {
|
||||
return -1;
|
||||
} else if (second->arKey == NULL) {
|
||||
} else if (second->nKeyLength == 0) {
|
||||
return 1;
|
||||
}
|
||||
min = MIN(first->nKeyLength, second->nKeyLength);
|
||||
|
Loading…
Reference in New Issue
Block a user