]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - exec.c
Fixed possible bug in VM. Added coverity rules to makefiles.
[xonotic/gmqcc.git] / exec.c
diff --git a/exec.c b/exec.c
index dccee5ed121205936fd05c2c9804dea8d6381cab..00f32f1c24060ae10708685d8024e02c736eea9f 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;
     }