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; }