This commit is contained in:
parent
dc5725d1af
commit
a167e4bc87
@ -1077,11 +1077,16 @@ PH7_PRIVATE sxi32 PH7_MemObjCmp(ph7_value *pObj1, ph7_value *pObj2, int bStrict,
|
|||||||
iComb = pObj1->nType | pObj2->nType;
|
iComb = pObj1->nType | pObj2->nType;
|
||||||
if(iComb & (MEMOBJ_NULL | MEMOBJ_RES | MEMOBJ_BOOL)) {
|
if(iComb & (MEMOBJ_NULL | MEMOBJ_RES | MEMOBJ_BOOL)) {
|
||||||
/* Explicitly handle NULL/VOID comparisons with numeric types */
|
/* Explicitly handle NULL/VOID comparisons with numeric types */
|
||||||
if ((pObj1->nType & (MEMOBJ_NULL | MEMOBJ_VOID)) || (pObj2->nType & (MEMOBJ_NULL | MEMOBJ_VOID))) {
|
if(pObj1->nType & (MEMOBJ_NULL | MEMOBJ_VOID))
|
||||||
/* Convert both operands to their numeric representation
|
{
|
||||||
* NULL/VOID will be converted to 0 by PH7_MemObjToNumeric */
|
/* Convert NULL/VOID to numeric */
|
||||||
PH7_MemObjToNumeric(pObj1);
|
PH7_MemObjToNumeric(pObj1);
|
||||||
|
}
|
||||||
|
if(pObj2->nType & (MEMOBJ_NULL | MEMOBJ_VOID)) {
|
||||||
|
/* Convert NULL/VOID to numeric */
|
||||||
PH7_MemObjToNumeric(pObj2);
|
PH7_MemObjToNumeric(pObj2);
|
||||||
|
}
|
||||||
|
if(PH7_MemObjIsNumeric(pObj1) && PH7_MemObjIsNumeric(pObj2)) {
|
||||||
/* Jump to the numeric comparison section */
|
/* Jump to the numeric comparison section */
|
||||||
goto Numeric;
|
goto Numeric;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user