Fixed equal comparison for objects.

git-svn-id: http://voip.null.ro/svn/yate@5871 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
oana 2014-07-21 12:29:38 +00:00
parent 86cecbd5dc
commit 023ff203ce
1 changed files with 10 additions and 3 deletions

View File

@ -1068,11 +1068,18 @@ bool ExpEvaluator::runOperation(ObjList& stack, const ExpOperation& oper, GenObj
val = (op1->valInteger() >= op2->valInteger()) ? 1 : 0;
break;
case OpcEq:
val = (*op1 == *op2) ? 1 : 0;
break;
case OpcNe:
val = (*op1 != *op2) ? 1 : 0;
{
ExpWrapper* w1 = YOBJECT(ExpWrapper,op1);
ExpWrapper* w2 = YOBJECT(ExpWrapper,op2);
if (op1->opcode() == op2->opcode() && w1 && w2)
val = w1->object() == w2->object() ? 1 : 0;
else
val = (*op1 == *op2) ? 1 : 0;
if (oper.opcode() == OpcNe)
val = val ? 0 : 1;
break;
}
default:
handled = false;
break;