1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Convert validity checks of IP_Address to is_valid method.

This commit is contained in:
Fabio Alessandrelli
2017-01-17 09:22:56 +01:00
parent e4b9b37ccf
commit 98a7e2b4e0
9 changed files with 32 additions and 11 deletions

View File

@@ -43,7 +43,7 @@ Error PacketPeerUDP::_set_dest_address(const String& p_address, int p_port) {
ip=p_address;
} else {
ip=IP::get_singleton()->resolve_hostname(p_address, ip_type);
if (ip==IP_Address())
if (!ip.is_valid())
return ERR_CANT_RESOLVE;
}