ref: 6007029a7fcb1184f5f3d698ed55f96fa4812ac1
parent: e29ec974f6737e8c51d8fd0fea306c1fa6c0ece0
author: Ori Bernstein <[email protected]>
date: Tue Jun 3 17:57:57 EDT 2014
Allow integer parsing to work with large integers. We used to fail when we were out of the range of strtol. strtoull is what we want to use, since the integer format is guaranteed to be unsigned. Unary '-' is applied elsewhere, as are range checks.
--- a/parse/tok.c
+++ b/parse/tok.c
@@ -646,7 +646,7 @@
} else {
t = mktok(Tintlit);
t->str = strdupn(&fbuf[start], fidx - start);
- t->intval = strtol(t->str, NULL, base);
+ t->intval = strtoull(t->str, NULL, base);
/* check suffixes:
* u -> unsigned
* l -> 64 bit