brtrue/brfalse now checks whether it's a non-null value

This commit is contained in:
de4dot 2012-08-04 12:04:03 +02:00
parent 19e8879d45
commit 4eb3b63a8a

View File

@ -220,6 +220,8 @@ namespace de4dot.blocks.cflow {
return emulateBranch(1, Int64Value.compareFalse((Int64Value)val1));
else if (val1.isNull())
return emulateBranch(1, true);
else if (val1.isObject() || val1.isString() || val1.isBoxed())
return emulateBranch(1, false);
else
return false;
}
@ -233,6 +235,8 @@ namespace de4dot.blocks.cflow {
return emulateBranch(1, Int64Value.compareTrue((Int64Value)val1));
else if (val1.isNull())
return emulateBranch(1, false);
else if (val1.isObject() || val1.isString() || val1.isBoxed())
return emulateBranch(1, true);
else
return false;
}