From 3f63bdaff3afb40e50d0857e9372d23cb82bd0ba Mon Sep 17 00:00:00 2001 From: Igor Dzuro Date: Fri, 17 Apr 2020 10:46:59 +0200 Subject: [PATCH] world tour --- du6/program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/du6/program.c b/du6/program.c index e11f303..e7e852c 100644 --- a/du6/program.c +++ b/du6/program.c @@ -89,7 +89,7 @@ intmax_t readMaxCount(char *buffer, int size) { char *endPtr; intmax_t result = strtoimax(buffer, &endPtr, 10); - if (errno == ERANGE || endPtr != buffer + (l - 1)) { + if (errno == ERANGE || result == 0 || endPtr != buffer + (l - 1)) { return -1; }