mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 14:21:36 +00:00
ir: fix bug that functions without declared locals would put temps at position zero ...
This commit is contained in:
parent
ae69812d92
commit
4d335c8704
1 changed files with 1 additions and 1 deletions
2
ir.c
2
ir.c
|
@ -2548,7 +2548,7 @@ static bool gen_global_function(ir_builder *ir, ir_value *global)
|
|||
fun.firstlocal = code_globals_elements;
|
||||
fun.locals = irfun->allocated_locals + irfun->locals_count;
|
||||
|
||||
local_var_end = 0;
|
||||
local_var_end = fun.firstlocal;
|
||||
for (i = 0; i < irfun->locals_count; ++i) {
|
||||
if (!ir_builder_gen_global(ir, irfun->locals[i])) {
|
||||
irerror(irfun->locals[i]->context, "Failed to generate global %s\n", irfun->locals[i]->name);
|
||||
|
|
Loading…
Reference in a new issue