test: "" is not a valid number. Closes bug 1915

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2010-06-03 01:47:04 +02:00
parent 26b6ccf340
commit 3e47cfec90

View File

@ -393,7 +393,7 @@ static number_t getn(const char *s)
if (errno != 0) if (errno != 0)
syntax(s, "out of range"); syntax(s, "out of range");
if (*(skip_whitespace(p))) if (p == s || *(skip_whitespace(p)) != '\0')
syntax(s, "bad number"); syntax(s, "bad number");
return r; return r;