Literals starting with '-' were interpreted as command token instead of literal token, "-3 set %i" failed as -3 was tried as command instead of an argument to set.

This commit is contained in:
Renaud 2015-06-12 21:06:18 +08:00
parent 26f0f2eb8b
commit 4d19ef668a
1 changed files with 1 additions and 1 deletions

2
eval.c
View File

@ -1122,7 +1122,7 @@ static int gettyp( char *token) {
return TKNUL;
/* a numeric literal? */
if (c >= '0' && c <= '9')
if( (c >= '0' && c <= '9') || c == '-')
return TKLIT;
switch (c) {