]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Error when the assignop for an assignment is invalid, eg. when trying to assign arrays
authorWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 17 Dec 2012 14:56:55 +0000 (15:56 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 17 Dec 2012 15:00:08 +0000 (16:00 +0100)
parser.c

index 84413fd934d59cffc5494d01c20b8a16251eec0c..4a1933bed1111ffdc28b077738bba9386e415989 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -926,7 +926,9 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy)
                 }
                 else
                     assignop = type_storep_instr[exprs[0]->expression.vtype];
-                if (!ast_compare_type(field->expression.next, exprs[1])) {
+                if (assignop == AINSTR_END ||
+                    !ast_compare_type(field->expression.next, exprs[1]))
+                {
                     ast_type_to_string(field->expression.next, ty1, sizeof(ty1));
                     ast_type_to_string(exprs[1], ty2, sizeof(ty2));
                     if (OPTS_FLAG(ASSIGN_FUNCTION_TYPES) &&