From: Michael Beck Date: Mon, 26 Nov 2007 01:32:14 +0000 (+0000) Subject: fixed overrun handling X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=6ccf498f2348845b25a9c40ff41f1f8aebcbfa0d;p=cparser fixed overrun handling [r18533] --- diff --git a/lexer.c b/lexer.c index a53325b..74f76c5 100644 --- a/lexer.c +++ b/lexer.c @@ -336,7 +336,7 @@ static unsigned long long parse_int_string(const char *s, const char **endptr, i case 16: for (;; ++s) { /* check for overrun */ - if (v <= 0x1000000000000000ULL) + if (v >= 0x1000000000000000ULL) break; switch (tolower(*s)) { case '0': v <<= 4; break; @@ -363,7 +363,7 @@ static unsigned long long parse_int_string(const char *s, const char **endptr, i case 8: for (;; ++s) { /* check for overrun */ - if (v <= 0x2000000000000000ULL) + if (v >= 0x2000000000000000ULL) break; switch (tolower(*s)) { case '0': v <<= 3; break;