- fixed incorrect code generation for '||' operator (at least I hope it's fixed now.)

This commit is contained in:
Christoph Oelckers 2016-02-07 21:36:02 +01:00
parent 5b74d417fa
commit 2a89a9f1d8

View file

@ -1697,7 +1697,7 @@ ExpEmit FxBinaryLogical::Emit(VMFunctionBuilder *build)
else
{
assert(Operator == TK_OrOr);
build->Emit(OP_EQ_K, 0, op1.RegNum, zero);
build->Emit(OP_EQ_K, 1, op1.RegNum, zero);
// If op1 is not 0, skip evaluation of op2.
size_t patchspot = build->Emit(OP_JMP, 0, 0, 0);