diff options
Diffstat (limited to 'src/login/login.c')
-rw-r--r-- | src/login/login.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/login/login.c b/src/login/login.c index e948264b2..e18396b23 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -3079,8 +3079,8 @@ int parse_login(int fd) if (server_fd[i] >= 0) { // Advanced subnet check [LuzZza] uint32 subnet_char_ip = lan_subnetcheck(ipl); - WFIFOL(fd,47+server_num*32) = (subnet_char_ip) ? htonl(subnet_char_ip) : htonl(server[i].ip); - WFIFOW(fd,47+server_num*32+4) = server[i].port; // /!\ must be sent in intel host byte order /!\ (client bug) + WFIFOL(fd,47+server_num*32) = htonl((subnet_char_ip) ? subnet_char_ip : server[i].ip); + WFIFOW(fd,47+server_num*32+4) = ntows(htons(server[i].port)); // [!] LE byte order here [!] memcpy(WFIFOP(fd,47+server_num*32+6), server[i].name, 20); WFIFOW(fd,47+server_num*32+26) = server[i].users; WFIFOW(fd,47+server_num*32+28) = server[i].maintenance; |