aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/test.c2
1 files changed, 1 insertions, 1 deletions
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;