mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Don't segfault when build_builtin_function detects an error.
This commit is contained in:
parent
806d9110a2
commit
c69ac1f56f
2 changed files with 8 additions and 4 deletions
|
@ -535,8 +535,10 @@ builtin_function
|
|||
def_t *def = $<def>-1;
|
||||
if (!def->external) {
|
||||
$$ = build_builtin_function (def, $<expr>0);
|
||||
build_scope ($$, $$->def, current_params);
|
||||
flush_scope ($$->scope, 1);
|
||||
if ($$) {
|
||||
build_scope ($$, $$->def, current_params);
|
||||
flush_scope ($$->scope, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
;
|
||||
|
|
|
@ -252,8 +252,10 @@ subprogram_declaration
|
|||
| subprogram_head ASSIGNOP '#' const ';'
|
||||
{
|
||||
$$ = build_builtin_function ($1, $4);
|
||||
build_scope ($$, $$->def, current_params);
|
||||
flush_scope ($$->scope, 1);
|
||||
if ($$) {
|
||||
build_scope ($$, $$->def, current_params);
|
||||
flush_scope ($$->scope, 1);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in a new issue