Modified to allow a space between the sign and the first digit of a constant.

This commit is contained in:
dtrg 2007-04-23 23:24:46 +00:00
parent 9b920e59cb
commit 67c4f3de87

View file

@ -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");