world tour

This commit is contained in:
Igor Dzuro 2020-04-17 10:46:59 +02:00
parent 34380748b0
commit 3f63bdaff3

View File

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