Fix Sys_IsLANAddress() on *nix

Don't just convert the first char of the IP.
LAN clients now get properly detected and don't need to auth
against the master server.
This commit is contained in:
dhewg 2012-07-04 01:07:44 +02:00
parent 20aaba2c65
commit 1da44eb856

View file

@ -230,7 +230,7 @@ bool Sys_IsLANAddress( const netadr_t adr ) {
}
for ( i = 0; i < num_interfaces; i++ ) {
ip = ntohl( adr.ip[0] );
ip = ntohl( *( unsigned int *)&adr.ip );
if( ( netint[i].ip & netint[i].mask ) == ( ip & netint[i].mask ) ) {
return true;
}