Skip to content

Commit

Permalink
use strtoul & sviv for hex, too
Browse files Browse the repository at this point in the history
  • Loading branch information
tokuhirom committed May 4, 2012
1 parent a389afd commit 315e9c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Nana/toke.re
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ int token_op(char *src, size_t len, int *used, int *found_end, int *lineno_inc,
OP(TOKEN_INTEGER);
}
"0x" [0-9a-fA-F]+ {
*yylval = sv_2mortal(newSViv(strtol(orig+2, &cursor, 16)));
*yylval = sv_2mortal(newSVuv(strtoul(orig+2, &cursor, 16)));
OP(TOKEN_INTEGER);
}
IDENT {
Expand Down

0 comments on commit 315e9c9

Please sign in to comment.