]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Fix evaluation order bug
authorDale Weiler <killfieldengine@gmail.com>
Sun, 30 Dec 2012 11:01:45 +0000 (11:01 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sun, 30 Dec 2012 11:01:45 +0000 (11:01 +0000)
exec.c
splint.sh

diff --git a/exec.c b/exec.c
index 2957d4c5bf315431353a5d6d7d9c8aaa7528adbc..1d6d182c939a8fc2521b6acc40bd873927907184 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -475,7 +475,8 @@ static qcint prog_enterfunction(qc_program *prog, prog_section_function *func)
     st.function = func;
 
     if (prog->xflags & VMXF_TRACE) {
-        vec_push(prog->function_stack, prog_getstring(prog, func->name));
+        const char *str = prog_getstring(prog, func->name);
+        vec_push(prog->function_stack, str);
     }
 
 #ifdef QCVM_BACKUP_STRATEGY_CALLER_VARS
index 0aa21316d739b5a0b339d6f3747ef01cad1afd56..ecca177bd7426df097ad179810e406279285890d 100755 (executable)
--- a/splint.sh
+++ b/splint.sh
@@ -63,8 +63,7 @@ FLAGS_MAYBE="\
 #these don't need to be here to onhibit the warning
 # remove one flag from here at a time while fixing the code so that
 FLAGS_TOFIX="\
-    -castfcnptr          \
-    -evalorder"
+    -castfcnptr"
 
 
 splint $FLAGS_STUPID $FLAGS_MAYBE $FLAGS_TOFIX $FLAGS_OTHERS *.c *.h