Modified to allow a space between the sign and the first digit of a constant.
authordtrg <none@none>
Mon, 23 Apr 2007 23:24:46 +0000 (23:24 +0000)
committerdtrg <none@none>
Mon, 23 Apr 2007 23:24:46 +0000 (23:24 +0000)
modules/src/read_em/reade.c

index 69acf27..f8bf157 100644 (file)
@@ -293,6 +293,11 @@ getnumber(c, ap)
                c = getbyte();
        }
 
+       /* Soak up any whitespace (to allow "- 4" to be considered a number). */
+       
+       while (isspace(c))
+               c = getbyte();
+               
        if (! isdigit(c)) {
                ungetbyte(c);
                syntax("digit expected");