]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Handle proper expression type assignment
authorDale Weiler <killfieldengine@gmail.com>
Fri, 4 Oct 2013 10:53:09 +0000 (06:53 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 4 Oct 2013 10:53:09 +0000 (06:53 -0400)
ast.c

diff --git a/ast.c b/ast.c
index 598cf5f3fea20af6bd1fca1feffe3222437eb7b1..5ea6d93b2f51a34f06bfe42fc25627f39f4111e4 100644 (file)
--- 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;