mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-17 11:39:11 +00:00
(svn r6275) Get rid of an ugly cast
This commit is contained in:
@@ -22,7 +22,10 @@ void NetworkServerYearlyLoop(void);
|
||||
|
||||
static inline const char* GetPlayerIP(const NetworkClientInfo* ci)
|
||||
{
|
||||
return inet_ntoa(*(const struct in_addr*)&ci->client_ip);
|
||||
struct in_addr addr;
|
||||
|
||||
addr.s_addr = ci->client_ip;
|
||||
return inet_ntoa(addr);
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
Reference in New Issue
Block a user