mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r6275) Get rid of an ugly cast
This commit is contained in:
parent
c4fb78a708
commit
453028b3a7
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user