Endianness fix for netplay_is_lan_address (#13413)

This commit is contained in:
Cthulhu-throwaway 2021-12-25 00:07:55 -03:00 committed by GitHub
parent 98bed89d6f
commit 9e208198f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8662,6 +8662,7 @@ bool netplay_is_lan_address(struct sockaddr_in *addr)
uint32_t uaddr;
memcpy(&uaddr, &addr->sin_addr, sizeof(uaddr));
uaddr = ntohl(uaddr);
for (i = 0; i < ARRAY_SIZE(subnets); i++)
if ((uaddr & masks[i]) == subnets[i])