libc: Fix bad logic when looking for IP address
This commit is contained in:
parent
94ffc190dd
commit
51f0ef4e03
@ -228,7 +228,7 @@ struct hostent * gethostbyname(const char * name) {
|
||||
int maybe_ip = 1;
|
||||
int dots = 0;
|
||||
for (const char * c = name; *c; ++c) {
|
||||
if (*c < '0' && *c > '9' && *c != '.') {
|
||||
if ((*c < '0' || *c > '9') && *c != '.') {
|
||||
maybe_ip = 0;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user