summaryrefslogtreecommitdiff
path: root/parse/tok.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-01-08 01:19:36 -0800
committerOri Bernstein <ori@eigenstate.org>2016-01-09 00:49:31 -0800
commitac297020506255ca01cde01c14145f3203d1a155 (patch)
tree328aa61dd735825dec58e07485cfe40b9da862e1 /parse/tok.c
parent8bc429fb93070938b8bc5d459da4f2664c00abae (diff)
downloadmc-ac297020506255ca01cde01c14145f3203d1a155.tar.gz
Start of parsing files.
Diffstat (limited to 'parse/tok.c')
-rw-r--r--parse/tok.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse/tok.c b/parse/tok.c
index 1137ead..cd3346d 100644
--- a/parse/tok.c
+++ b/parse/tok.c
@@ -645,7 +645,7 @@ static Tok *number(int base)
continue;
if (c == '.')
isfloat = 1;
- else if (hexval(c) < 0 || hexval(c) > base)
+ else if (hexval(c) < 0 || hexval(c) >= base)
lfatal(curloc, "Integer digit '%c' outside of base %d", c, base);
if (nbuf >= sizeof buf - 1) {
buf[nbuf - 1] = '\0';