]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
temporarily disable the 'constant' flag when parsing the initializer to avoid the...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 20:10:43 +0000 (21:10 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 20:10:43 +0000 (21:10 +0100)
parser.c

index 0bedff263139e6cc60d1b9aa60ce4c2ba8459288..945ddbf76c8ee0b4ff513e3f339b1ea4a6ddd9ee 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -3879,7 +3879,10 @@ skipvar:
                     ast_unref(cval);
                 }
             } else {
+                bool cvq;
                 shunt sy = { NULL, NULL };
+                cvq = var->constant;
+                var->constant = false;
                 vec_push(sy.out, syexp(ast_ctx(var), (ast_expression*)var));
                 vec_push(sy.out, syexp(ast_ctx(cexp), (ast_expression*)cexp));
                 vec_push(sy.ops, syop(ast_ctx(var), parser->assign_op));
@@ -3892,6 +3895,7 @@ skipvar:
                 }
                 vec_free(sy.out);
                 vec_free(sy.ops);
+                var->constant = cvq;
             }
         }