]> git.draconx.ca Git - cdecl99.git/blobdiff - t/rendertest.c
tests: Work around some ancient printf bugs.
[cdecl99.git] / t / rendertest.c
index 93574e2ef9a5b1ce611ab1a95135196ccc072535..14faafb28990544f38645ccf24500120334efbac 100644 (file)
@@ -85,7 +85,7 @@ static int do_test(char *line, unsigned long n, int mode)
                return -1;
        }
 
-       printf("%lu %.*s\n", (unsigned long)rc, -(n>0), line);
+       printf(n > 0 ? "%lu %s\n" : "%lu\n", (unsigned long)rc, line);
        cdecl_free(decl);
        return 0;
 }