diff options
author | Bernard Normier <bernard@zeroc.com> | 2005-04-18 16:19:51 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2005-04-18 16:19:51 +0000 |
commit | 1281ffa519e90550715d77c7548d38205072a10e (patch) | |
tree | 5ac39a746740cdacde8138cf8d15dc90746eaa4d /cpp/src/Slice/Scanner.l | |
parent | Fix (diff) | |
download | ice-1281ffa519e90550715d77c7548d38205072a10e.tar.bz2 ice-1281ffa519e90550715d77c7548d38205072a10e.tar.xz ice-1281ffa519e90550715d77c7548d38205072a10e.zip |
Fixed bug #80: removed Int64Min / Int64Max
Diffstat (limited to 'cpp/src/Slice/Scanner.l')
-rw-r--r-- | cpp/src/Slice/Scanner.l | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l index 561575ff044..101d87e108a 100644 --- a/cpp/src/Slice/Scanner.l +++ b/cpp/src/Slice/Scanner.l @@ -318,10 +318,9 @@ floating_literal (({fractional_constant}{exponent_part}?)|((\+|-)?[[:digit:]]+{e {integer_constant} { IntegerTokPtr itp = new IntegerTok; *yylvalp = itp; - errno = 0; - itp->v = IceUtil::strToInt64(yytext, 0, 0); - if(errno == ERANGE && (itp->v == IceUtil::Int64Min || itp->v == IceUtil::Int64Max)) + if(!IceUtil::stringToInt64(string(yytext), itp->v)) { + assert(itp->v != 0); string msg = "integer constant `"; msg += yytext; msg += "' out of range"; |