test: "" is not a valid number. Closes bug 1915
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
26b6ccf340
commit
3e47cfec90
@ -393,7 +393,7 @@ static number_t getn(const char *s)
|
||||
if (errno != 0)
|
||||
syntax(s, "out of range");
|
||||
|
||||
if (*(skip_whitespace(p)))
|
||||
if (p == s || *(skip_whitespace(p)) != '\0')
|
||||
syntax(s, "bad number");
|
||||
|
||||
return r;
|
||||
|
Loading…
Reference in New Issue
Block a user