[012568kqv]a: correctly lex full range of integers in the assemblers (thanks Ori_B)
The Plan 9 assemblers use strtoll to parse the integer literals in their input. It turns out that this is almost correct, but VLONG_MIN is clamped. This patch changes to use strtoull in order to allow the full range of integers.
This commit is contained in:
parent
3309f05b97
commit
8b6621a360
1 changed files with 2 additions and 2 deletions
|
@ -343,9 +343,9 @@ l1:
|
|||
goto casee;
|
||||
*cp = 0;
|
||||
if(sizeof(yylval.lval) == sizeof(vlong))
|
||||
yylval.lval = strtoll(symb, nil, 10);
|
||||
yylval.lval = strtoull(symb, nil, 10);
|
||||
else
|
||||
yylval.lval = strtol(symb, nil, 10);
|
||||
yylval.lval = strtoul(symb, nil, 10);
|
||||
|
||||
ncu:
|
||||
while(c == 'U' || c == 'u' || c == 'l' || c == 'L')
|
||||
|
|
Loading…
Reference in a new issue