If you're relying on a variable being a certain bit length, specify it explicitly. Also, You should just use inet_ntop (or if that's not defined inet_ntoa).
This commit is contained in:
@@ -540,8 +540,8 @@ void NetworkSyncManager::Update(float fDeltaTime)
|
||||
ThisServer.Name = BroadIn.ReadNT();
|
||||
int port = BroadIn.Read2();
|
||||
BroadIn.Read2(); //Num players connected.
|
||||
unsigned long addy = EzSockets::LongFromAddrIn(BroadcastReception->fromAddr);
|
||||
ThisServer.Address = ssprintf( "%d.%d.%d.%d:%d",
|
||||
uint32_t addy = EzSockets::LongFromAddrIn(BroadcastReception->fromAddr);
|
||||
ThisServer.Address = ssprintf( "%u.%u.%u.%u:%d",
|
||||
(addy<<0)>>24, (addy<<8)>>24, (addy<<16)>>24, (addy<<24)>>24, port );
|
||||
|
||||
//It's fairly safe to assume that users will not be on networks with more than
|
||||
|
||||
Reference in New Issue
Block a user