aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard>2006-10-28 14:05:19 +0000
committerbellard <bellard>2006-10-28 14:05:19 +0000
commit3b8cd565be2bed270baa495310051de50cd1cf93 (patch)
tree8af7b64ae21d6ac5dc3ce78745d192300191db91
parent200b58dad81f4c871e6796695577076fa90ee0ed (diff)
downloadtinycc-3b8cd565be2bed270baa495310051de50cd1cf93.tar.gz
tinycc-3b8cd565be2bed270baa495310051de50cd1cf93.tar.bz2
fixed multiple concatenation of PPNUM tokens (initial patch by Dave Dodge)
-rw-r--r--tcc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tcc.c b/tcc.c
index 7596adf..ac22162 100644
--- a/tcc.c
+++ b/tcc.c
@@ -4240,7 +4240,10 @@ static inline int *macro_twosharps(const int *macro_str)
/* if number, then create a number token */
/* NOTE: no need to allocate because
tok_str_add2() does it */
- tokc.cstr = &cstr;
+ cstr_reset(&tokcstr);
+ tokcstr = cstr;
+ cstr_new(&cstr);
+ tokc.cstr = &tokcstr;
} else {
/* if identifier, we must do a test to
validate we have a correct identifier */