mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-23 11:11:22 +00:00
ast_ternary needs to adopt the output type
This commit is contained in:
parent
9c8dc43775
commit
e20184ae59
1 changed files with 5 additions and 0 deletions
5
ast.c
5
ast.c
|
@ -652,6 +652,11 @@ ast_ternary* ast_ternary_new(lex_ctx ctx, ast_expression *cond, ast_expression *
|
|||
self->on_true = ontrue;
|
||||
self->on_false = onfalse;
|
||||
|
||||
if (!ast_type_adopt(self, ontrue)) {
|
||||
ast_ternary_delete(self);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue