Modified to allow a space between the sign and the first digit of a constant.
This commit is contained in:
parent
9731e1e349
commit
f2cfcba52e
@ -293,6 +293,11 @@ getnumber(c, ap)
|
|||||||
c = getbyte();
|
c = getbyte();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Soak up any whitespace (to allow "- 4" to be considered a number). */
|
||||||
|
|
||||||
|
while (isspace(c))
|
||||||
|
c = getbyte();
|
||||||
|
|
||||||
if (! isdigit(c)) {
|
if (! isdigit(c)) {
|
||||||
ungetbyte(c);
|
ungetbyte(c);
|
||||||
syntax("digit expected");
|
syntax("digit expected");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user