]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - exec.c
Fix evaluation order bug
[xonotic/gmqcc.git] / exec.c
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