]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Make the disasm a bit more verbose as to where globals are
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 18 Nov 2012 19:32:22 +0000 (20:32 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 18 Nov 2012 19:32:22 +0000 (20:32 +0100)
exec.c

diff --git a/exec.c b/exec.c
index ee61c1ae37efeb5e6364d897c9a296c7ef7d9e9c..f50eac1b40098794d00a223f05ddfff505dbce81 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -334,16 +334,15 @@ static void trace_print_global(qc_program *prog, unsigned int glob, int vtype)
     def = prog_getdef(prog, glob);
     value = (qcany*)(&prog->globals[glob]);
 
+    len = printf("[@%u] ", glob);
     if (def) {
         const char *name = prog_getstring(prog, def->name);
         if (name[0] == '#')
-            len = printf("$");
+            len += printf("$");
         else
-            len = printf("%s ", name);
+            len += printf("%s ", name);
         vtype = def->type & DEF_TYPEMASK;
     }
-    else
-        len = printf("[@%u] ", glob);
 
     switch (vtype) {
         case TYPE_VOID: