]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Expression has undefined behavior (left operand modifies code->globals->used, used...
authorDale Weiler <killfieldengine@gmail.com>
Sat, 27 Apr 2013 15:20:01 +0000 (15:20 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 27 Apr 2013 15:20:01 +0000 (15:20 +0000)
ir.c

diff --git a/ir.c b/ir.c
index 82dcb9befaf578f2c6d671a41ef88ac7fe6c3644..a124bd1fa60e1c608a276780812f321cfdc8a594 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -3418,7 +3418,8 @@ static bool ir_builder_gen_global(code_t *code, ir_builder *self, ir_value *glob
     {
         ir_value_code_setaddr(global, vec_size(code->globals));
         if (global->hasvalue) {
-            vec_push(code->globals, code_genstring(code, global->constval.vstring));
+            uint32_t load = code_genstring(code, global->constval.vstring);
+            vec_push(code->globals, load);
         } else {
             vec_push(code->globals, 0);
         }