From 3e47cfec90fbe358692b3b960f7fa2303e465c2f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 3 Jun 2010 01:47:04 +0200 Subject: test: "" is not a valid number. Closes bug 1915 Signed-off-by: Denys Vlasenko --- coreutils/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreutils/test.c b/coreutils/test.c index 5864c7f32..a1d164574 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -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; -- cgit v1.2.3