]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
Look for include files in the currently #included file's directory first
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index 76e400727f118499bf9f5b517d094747859101a9..a73f3f1df3f7e29f6d4c4992e6e94a1598355ca4 100644 (file)
--- a/main.c
+++ b/main.c
@@ -567,11 +567,14 @@ srcdone:
             }
 
             if (opts_pp_only) {
+                const char *out;
                 if (!ftepp_preprocess_file(items[itr].filename)) {
                     retval = 1;
                     goto cleanup;
                 }
-                fprintf(outfile, "%s", ftepp_get());
+                out = ftepp_get();
+                if (out)
+                    fprintf(outfile, "%s", out);
                 ftepp_flush();
             }
             else {