From: Dale Weiler Date: Fri, 4 Oct 2013 10:53:09 +0000 (-0400) Subject: Handle proper expression type assignment X-Git-Tag: 0.3.5~50 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2cf5046d3807551365180a73c923762182f7bc83;p=xonotic%2Fgmqcc.git Handle proper expression type assignment --- diff --git a/ast.c b/ast.c index 598cf5f..5ea6d93 100644 --- a/ast.c +++ b/ast.c @@ -467,9 +467,9 @@ ast_binary* ast_binary_new(lex_ctx_t ctx, int op, else self->expression.vtype = TYPE_FLOAT; } - else if (op == INSTR_BITAND || op == INSTR_BITOR) + else if (op == INSTR_BITAND || op == INSTR_BITOR || op == INSTR_MUL_F) self->expression.vtype = TYPE_FLOAT; - else if (op == INSTR_MUL_FV || op == INSTR_MUL_FV) + else if (op >= INSTR_MUL_V && op <= INSTR_MUL_VF) self->expression.vtype = TYPE_VECTOR; else self->expression.vtype = left->vtype;