Add check for invalid numbers.

If there are some characters after TCC parses a number, it is an error.

This bug was reported on list:

http://www.mail-archive.com/tinycc-devel@nongnu.org/msg02014.html
This commit is contained in:
Shinichiro Hamaji 2009-04-01 02:44:49 +09:00 committed by grischka
parent af6cbc48d1
commit 6512d9e2ea

2
tcc.c
View File

@ -3660,6 +3660,8 @@ void parse_number(const char *p)
else else
tokc.ull = n; tokc.ull = n;
} }
if (ch)
error("invalid number\n");
} }