]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - exec.c
cherry-pick diagnostics testsuite into cooking. We can now create compiler diagnostic...
[xonotic/gmqcc.git] / exec.c
diff --git a/exec.c b/exec.c
index dccee5ed121205936fd05c2c9804dea8d6381cab..959f90b5d9ecf4d8c50a0ee9e1a17664662000fa 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -304,7 +304,9 @@ static void trace_print_global(qc_program *prog, unsigned int glob, int vtype) {
     int       len;
 
     if (!glob) {
-        len = printf("<null>,");
+        if ((len = printf("<null>,")) == -1)
+            len = 0;
+
         goto done;
     }
 
@@ -1048,6 +1050,8 @@ int main(int argc, char **argv) {
                 p.vtype = TYPE_STRING;
             else if (argv[1][1] == 'v')
                 p.vtype = TYPE_VECTOR;
+            else
+                p.vtype = TYPE_VOID;
 
             --argc;
             ++argv;