From e612abe4ba26bd0c72474f94d407c92f0a20f6d6 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Thu, 26 Jan 2012 10:53:56 -0800 Subject: [PATCH] Fix parsing of 64-bit integer constants on Windows. (i.e., use the 64-bit unsigned integer parsing function, not the 64-bit signed one.) Fixes bug #68. --- lex.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lex.ll b/lex.ll index 1b6d382b..f21df180 100644 --- a/lex.ll +++ b/lex.ll @@ -156,7 +156,7 @@ L?\"(\\.|[^\\"])*\" { lStringConst(yylval, yylloc); return TOKEN_STRING_LITERAL; yylval->intVal = lParseBinary(yytext+2, *yylloc, &endPtr); else { #if defined(ISPC_IS_WINDOWS) && !defined(__MINGW32__) - yylval->intVal = _strtoi64(yytext, &endPtr, 0); + yylval->intVal = _strtoui64(yytext, &endPtr, 0); #else // FIXME: should use strtouq and then issue an error if we can't // fit into 64 bits...