]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Finally fix the bug in -D
authorDale Weiler <killfieldengine@gmail.com>
Mon, 17 Dec 2012 15:46:07 +0000 (15:46 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Mon, 17 Dec 2012 15:46:07 +0000 (15:46 +0000)
main.c

diff --git a/main.c b/main.c
index 1bb988324aa8ecb837bce5542c536be3711bd334..871e3e7ba02e0b5ffa8f6a3cfe682ae9ee9d35df 100644 (file)
--- a/main.c
+++ b/main.c
@@ -637,13 +637,15 @@ int main(int argc, char **argv) {
     util_debug("COM", "starting ...\n");
 
     /* add macros */
-    for (itr = 0; itr < vec_size(ppems); itr++) {
-        ftepp_add_macro(ppems[itr].name, ppems[itr].value);
-        mem_d(ppems[itr].name);
+    if (opts.pp_only || OPTS_FLAG(FTEPP)) {
+        for (itr = 0; itr < vec_size(ppems); itr++) {
+            ftepp_add_macro(ppems[itr].name, ppems[itr].value);
+            mem_d(ppems[itr].name);
 
-        /* can be null */
-        if (ppems[itr].value)
-            mem_d(ppems[itr].value);
+            /* can be null */
+            if (ppems[itr].value)
+                mem_d(ppems[itr].value);
+        }
     }
 
     if (!vec_size(items)) {