commit | 5216721a532c348bcc59a03c7ee206f2cb2ae497 | [log] [tgz] |
---|---|---|
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | Thu Apr 24 18:07:05 2008 +0000 |
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | Thu Apr 24 18:07:05 2008 +0000 |
tree | d6d54b8cd3713662351f829f71e8d5eb529b4d8d | |
parent | 11034c6c167c238d32fdba66300d496364a6d366 [diff] [blame] |
Issue2681: the literal 0o8 was wrongly accepted, and evaluated as float(0.0). This happened only when 8 is the first digit. Credits go to Lukas Meuser.
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 29fb114..1d0a4aa 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c
@@ -1351,7 +1351,7 @@ else if (c == 'o' || c == 'O') { /* Octal */ c = tok_nextc(tok); - if (c < '0' || c > '8') { + if (c < '0' || c >= '8') { tok->done = E_TOKEN; tok_backup(tok, c); return ERRORTOKEN;