mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
ast_unary needs to set its type
This commit is contained in:
parent
7cc1609117
commit
99fe673f0a
1 changed files with 5 additions and 0 deletions
5
ast.c
5
ast.c
|
@ -322,6 +322,11 @@ ast_unary* ast_unary_new(lex_ctx ctx, int op,
|
|||
self->op = op;
|
||||
self->operand = expr;
|
||||
|
||||
if (op >= INSTR_NOT_F && op <= INSTR_NOT_FNC) {
|
||||
self->expression.vtype = TYPE_FLOAT;
|
||||
} else
|
||||
asterror(ctx, "cannot determine type of unary operation %s", asm_instr[op].m);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue