This commit is contained in:
parent
fdfeb219d9
commit
eead19918d
@ -1076,6 +1076,15 @@ PH7_PRIVATE sxi32 PH7_MemObjCmp(ph7_value *pObj1, ph7_value *pObj2, int bStrict,
|
||||
/* Combine flag together */
|
||||
iComb = pObj1->nType | pObj2->nType;
|
||||
if(iComb & (MEMOBJ_NULL | MEMOBJ_RES | MEMOBJ_BOOL)) {
|
||||
/* Explicitly handle NULL/VOID comparisons with numeric types */
|
||||
if ((pObj1->nType & (MEMOBJ_NULL | MEMOBJ_VOID)) || (pObj2->nType & (MEMOBJ_NULL | MEMOBJ_VOID))) {
|
||||
/* Convert both operands to their numeric representation
|
||||
* NULL/VOID will be converted to 0 by PH7_MemObjToNumeric */
|
||||
PH7_MemObjToNumeric(pObj1);
|
||||
PH7_MemObjToNumeric(pObj2);
|
||||
/* Jump to the numeric comparison section */
|
||||
goto Numeric;
|
||||
}
|
||||
/* Convert to boolean: Keep in mind FALSE < TRUE */
|
||||
if((pObj1->nType & MEMOBJ_BOOL) == 0) {
|
||||
PH7_MemObjToBool(pObj1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user