fixed to not accept dots in numbers
This commit is contained in:
parent
3228f4f21b
commit
3edf9486c9
1 changed files with 2 additions and 2 deletions
|
@ -311,7 +311,7 @@ register c;
|
||||||
c += ('a' - 'A');
|
c += ('a' - 'A');
|
||||||
*p++ = c;
|
*p++ = c;
|
||||||
c = nextchar();
|
c = nextchar();
|
||||||
} while (ISALNUM(c));
|
} while (isalnum(c));
|
||||||
peekc = c;
|
peekc = c;
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
c = *--p;
|
c = *--p;
|
||||||
|
@ -335,7 +335,7 @@ register c;
|
||||||
if (c > '9')
|
if (c > '9')
|
||||||
c -= ('a' - '9' - 1);
|
c -= ('a' - '9' - 1);
|
||||||
c -= '0';
|
c -= '0';
|
||||||
if (c >= radix)
|
if ((unsigned)c >= radix)
|
||||||
serror("digit exceeds radix");
|
serror("digit exceeds radix");
|
||||||
yylval.y_valu = yylval.y_valu * radix + c;
|
yylval.y_valu = yylval.y_valu * radix + c;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue