From 4d19ef668a0b2e36769ff053373c582bc07b3573 Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Fri, 12 Jun 2015 21:06:18 +0800 Subject: [PATCH] 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. --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval.c b/eval.c index c75789b..4c36f5e 100644 --- a/eval.c +++ b/eval.c @@ -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) {