From f164a13d69148bbee01c0802ef5fbbe67a298c8a Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Mon, 12 Dec 2005 09:45:58 +0000 Subject: [PATCH] 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). --- stepmania/src/NetworkSyncManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/NetworkSyncManager.cpp b/stepmania/src/NetworkSyncManager.cpp index bf9f5ad741..8e8a72e714 100644 --- a/stepmania/src/NetworkSyncManager.cpp +++ b/stepmania/src/NetworkSyncManager.cpp @@ -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