aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrischka <grischka>2011-01-20 20:17:24 +0100
committergrischka <grischka>2011-02-04 20:23:43 +0100
commit2775173d4db9e4767fdf9d831aade99541266bd9 (patch)
tree114d9aa835b124b07a3202728f0cfebe16ae56bd
parente3e5d4ad7a475e30ea13ad1ba9f23e6210d5d431 (diff)
downloadtinycc-2775173d4db9e4767fdf9d831aade99541266bd9.tar.gz
tinycc-2775173d4db9e4767fdf9d831aade99541266bd9.tar.bz2
fix crash with get_tok_str() in skip()
crash was triggered by numbers etc. as unexpected token, i.e. everything that requires additional information with the token.
-rw-r--r--tccpp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tccpp.c b/tccpp.c
index 27f9870..464d60b 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -90,7 +90,7 @@ static void macro_subst(
ST_FUNC void skip(int c)
{
if (tok != c)
- error("'%c' expected (got \"%s\")", c, get_tok_str(tok, NULL));
+ error("'%c' expected (got \"%s\")", c, get_tok_str(tok, &tokc));
next();
}