Skip to content

Commit 403fbb4

Browse files
committed
Linux compile fix
1 parent fee55d2 commit 403fbb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MTA10_Server/mods/deathmatch/logic/CGame.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,8 @@ bool CGame::Start ( int iArgumentCount, char* szArguments [] )
605605
// Check if IP is one of the most common private IP addresses
606606
in_addr serverIp;
607607
serverIp.s_addr = inet_addr( strServerIP );
608-
uchar a = serverIp.S_un.S_un_b.s_b1;
609-
uchar b = serverIp.S_un.S_un_b.s_b2;
608+
uchar a = ( (uchar*)&serverIp.s_addr )[0];
609+
uchar b = ( (uchar*)&serverIp.s_addr )[1];
610610
if ( a == 10 || a == 127 || ( a == 169 && b == 254 ) || ( a == 192 && b == 168 ) )
611611
{
612612
CLogger::ErrorPrintf ( "Can not specify private IP '%s' with ase enabled! Use: <serverip>auto</serverip>\n", *strServerIP );

0 commit comments

Comments
 (0)