From: Wolfgang (Blub) Bumiller Date: Sat, 18 Aug 2012 18:02:18 +0000 (+0200) Subject: ast_unary needs to set its type X-Git-Tag: 0.1-rc1~184 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=99fe673f0a7877e8b502c8832d606697436318da;p=xonotic%2Fgmqcc.git ast_unary needs to set its type --- diff --git a/ast.c b/ast.c index c3dfe21..3d8d45f 100644 --- a/ast.c +++ b/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; }