diff --git a/libs/net/nc/net_udp.c b/libs/net/nc/net_udp.c index 709dea9a5..f91786ead 100644 --- a/libs/net/nc/net_udp.c +++ b/libs/net/nc/net_udp.c @@ -262,9 +262,6 @@ NET_GetPacket (void) sizeof (net_message_buffer), 0, (struct sockaddr *) &from, &fromlen); - SockadrToNetadr (&from, &net_from); - - if (ret == -1) { #ifdef _WIN32 int err = WSAGetLastError (); @@ -291,6 +288,8 @@ NET_GetPacket (void) return false; } + SockadrToNetadr (&from, &net_from); + // Check for malformed packets if (ntohs (net_from.port) < 1024) { Sys_Printf ("Warning: Packet from %s dropped: Bad port\n",