mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +00:00
Don't check for is_return but for final at the end of a function so that if 'goto' is the last expression we don't try to append a return
This commit is contained in:
parent
93341dd009
commit
8d86d7d1c1
1 changed files with 1 additions and 1 deletions
2
ast.c
2
ast.c
|
@ -1505,7 +1505,7 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir)
|
|||
}
|
||||
|
||||
/* TODO: check return types */
|
||||
if (!self->curblock->is_return)
|
||||
if (!self->curblock->final)
|
||||
{
|
||||
if (!self->vtype->expression.next ||
|
||||
self->vtype->expression.next->expression.vtype == TYPE_VOID)
|
||||
|
|
Loading…
Reference in a new issue