Browse Source

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

dtrg 17 years ago
parent
commit
f2cfcba52e
1 changed files with 5 additions and 0 deletions
  1. 5 0
      modules/src/read_em/reade.c

+ 5 - 0
modules/src/read_em/reade.c

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