瀏覽代碼

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

dtrg 17 年之前
父節點
當前提交
67c4f3de87
共有 1 個文件被更改,包括 5 次插入0 次删除
  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");