]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
Merge branch 'master' into test-suite
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index 3f00888532878df211f5928f28ed86359ee3c765..4c8062d7dcdb1b125101c77348c26952c9ac592c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2012
  *     Dale Weiler
 /*
  * Copyright (C) 2012
  *     Dale Weiler
+ *     Wolfgang Bumiller
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
@@ -225,6 +226,8 @@ static bool options_parse(int argc, char **argv) {
             if (options_long_gcc("redirerr", &argc, &argv, &redirerr)) {
                 continue;
             }
             if (options_long_gcc("redirerr", &argc, &argv, &redirerr)) {
                 continue;
             }
+            
+            con_change(redirout, redirerr);
 
             if (!strcmp(argv[0]+1, "debug")) {
                 opts_debug = true;
 
             if (!strcmp(argv[0]+1, "debug")) {
                 opts_debug = true;
@@ -382,7 +385,6 @@ static bool options_parse(int argc, char **argv) {
             vec_push(items, item);
         }
     }
             vec_push(items, item);
         }
     }
-    con_change(redirout, redirerr);
     return true;
 }
 
     return true;
 }
 
@@ -610,7 +612,8 @@ cleanup:
     con_close();
     vec_free(items);
 
     con_close();
     vec_free(items);
 
-    parser_cleanup();
+    if (!opts_pp_only)
+        parser_cleanup();
     if (opts_output_free)
         mem_d((char*)opts_output);
 
     if (opts_output_free)
         mem_d((char*)opts_output);