mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 03:50:36 +00:00
fix wrong count on IF/IFNOT jumps
This commit is contained in:
parent
16093adb09
commit
abc574289f
1 changed files with 2 additions and 2 deletions
4
ir.c
4
ir.c
|
@ -2342,13 +2342,13 @@ tailcall:
|
|||
|
||||
if (ontrue->generated) {
|
||||
stmt.opcode = INSTR_IF;
|
||||
stmt.o2.s1 = (ontrue->code_start-1) - code_statements_elements;
|
||||
stmt.o2.s1 = (ontrue->code_start) - code_statements_elements;
|
||||
if (code_statements_add(stmt) < 0)
|
||||
return false;
|
||||
}
|
||||
if (onfalse->generated) {
|
||||
stmt.opcode = INSTR_IFNOT;
|
||||
stmt.o2.s1 = (onfalse->code_start-1) - code_statements_elements;
|
||||
stmt.o2.s1 = (onfalse->code_start) - code_statements_elements;
|
||||
if (code_statements_add(stmt) < 0)
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue