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:
parent
af6cbc48d1
commit
6512d9e2ea
1 changed files with 2 additions and 0 deletions
2
tcc.c
2
tcc.c
|
@ -3660,6 +3660,8 @@ void parse_number(const char *p)
|
||||||
else
|
else
|
||||||
tokc.ull = n;
|
tokc.ull = n;
|
||||||
}
|
}
|
||||||
|
if (ch)
|
||||||
|
error("invalid number\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue