commit b776ea1b18419b7be3b62e207259f1b4115a5c17
parent e87b3ab194e7cf293c90f555b96a9278c1698215
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 23 May 2015 10:07:12 +0200
Fix copydefine bug
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/cc1/cpp.c b/cc1/cpp.c
@@ -200,7 +200,8 @@ set_nargs:
static char *
copydefine(char *s, char *args[], char *buff, int bufsiz, int nargs)
{
- unsigned ncopy, n;
+ unsigned ncopy;
+ int n;
size_t len;
char arroba[6], *par, *endp, **bp;
@@ -222,7 +223,7 @@ copydefine(char *s, char *args[], char *buff, int bufsiz, int nargs)
sprintf(arroba, "@%02d@", n);
break;
}
- if (n == nargs)
+ if (n == nargs || nargs == -1)
par = s, ncopy = len;
else
par = arroba, ncopy = 4;