Move increment of octets

This commit is contained in:
0x1eef 2023-09-20 12:43:44 -03:00
parent 637256206f
commit e34aef9981

View file

@ -35,14 +35,13 @@ isinetaddr4(const char *str)
digits++;
if (!in_range(buf)) {
return 0;
} else if (str[l-1] == SEP) {
octets++;
}
}
} else {
return 0;
}
if (str[l-1] == SEP) {
octets++;
}
}
return octets == MAX_OCTETS && digits <= MAX_DIGITLEN;
}