summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2008-11-25 09:16:26 +0000
committerPeter Johnson <peter@tortall.net>2008-11-25 09:16:26 +0000
commit36598c73343484bf56e84bb7512e2ae9cf22b56b (patch)
tree759c6c2c67e0c5d6be11972f34ddf59acf6c0fad
parentbb1aaf9efd64c6d1df378111f9ddd3a9a96f49a1 (diff)
downloadyasm-36598c73343484bf56e84bb7512e2ae9cf22b56b.tar.gz
Don't assume CPP_PROG is 3 characters long (e.g. "gcc -E" isn't).
Reported and fix submitted by: Mark Charney svn path=/trunk/yasm/; revision=2159
-rw-r--r--modules/preprocs/cpp/cpp-preproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/preprocs/cpp/cpp-preproc.c b/modules/preprocs/cpp/cpp-preproc.c
index c58e4044..821b98b5 100644
--- a/modules/preprocs/cpp/cpp-preproc.c
+++ b/modules/preprocs/cpp/cpp-preproc.c
@@ -103,7 +103,7 @@ cpp_build_cmdline(yasm_preproc_cpp *pp, const char *extra)
cmdline = p = yasm_xmalloc(strlen(CPP_PROG)+CMDLINE_SIZE);
limit = p + CMDLINE_SIZE;
strcpy(p, CPP_PROG);
- p += 3;
+ p += strlen(CPP_PROG);
arg = TAILQ_FIRST(&pp->cpp_args);