mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
Fix code generation for && and ||
- The test condition should be the same for both sides of the operators.
This commit is contained in:
parent
c63f65d441
commit
138cdccaf9
1 changed files with 2 additions and 2 deletions
|
@ -1681,7 +1681,7 @@ ExpEmit FxBinaryLogical::Emit(VMFunctionBuilder *build)
|
|||
op2.Free(build);
|
||||
|
||||
ExpEmit to(build, REGT_INT);
|
||||
build->Emit(OP_EQ_K, 0, op2.RegNum, zero);
|
||||
build->Emit(OP_EQ_K, 1, op2.RegNum, zero);
|
||||
build->Emit(OP_JMP, 2);
|
||||
build->Emit(OP_LI, to.RegNum, 1);
|
||||
build->Emit(OP_JMP, 1);
|
||||
|
@ -1702,7 +1702,7 @@ ExpEmit FxBinaryLogical::Emit(VMFunctionBuilder *build)
|
|||
op2.Free(build);
|
||||
|
||||
ExpEmit to(build, REGT_INT);
|
||||
build->Emit(OP_EQ_K, 1, op2.RegNum, zero);
|
||||
build->Emit(OP_EQ_K, 0, op2.RegNum, zero);
|
||||
build->Emit(OP_JMP, 2);
|
||||
build->Emit(OP_LI, to.RegNum, 0);
|
||||
build->Emit(OP_JMP, 1);
|
||||
|
|
Loading…
Reference in a new issue