diff options
Diffstat (limited to 'src/network/network_udp.cpp')
-rw-r--r-- | src/network/network_udp.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index 01dad9cbc..886639fe4 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -363,13 +363,12 @@ static void NetworkUDPBroadCast(NetworkUDPSocketHandler *socket) { uint i; - for (i = 0; _broadcast_list[i] != 0; i++) { + for (i = 0; !StrEmpty(_broadcast_list[i].GetHostname()); i++) { Packet p(PACKET_UDP_CLIENT_FIND_SERVER); - NetworkAddress out_addr(_broadcast_list[i], _settings_client.network.server_port); - DEBUG(net, 4, "[udp] broadcasting to %s", out_addr.GetHostname()); + DEBUG(net, 4, "[udp] broadcasting to %s", _broadcast_list[i].GetHostname()); - socket->SendPacket(&p, &out_addr); + socket->SendPacket(&p, &_broadcast_list[i]); } } |