* Fix wrong interpretation of number of games (only the first byte of the 32bit long unsigned integer was used)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1630 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2007-05-13 18:52:29 +00:00
parent 0a590a79af
commit 48f37b22d9
1 changed files with 3 additions and 3 deletions

View File

@ -1385,11 +1385,11 @@ BOOL NETfindGame()
if ( SDLNet_CheckSockets(socket_set, 1000) > 0
&& SDLNet_SocketReady(tcp_socket)
&& SDLNet_TCP_Recv(tcp_socket, buffer, sizeof(int))) {
gamesavailable=SDL_SwapBE32((UDWORD)buffer[0]);
&& SDLNet_TCP_Recv(tcp_socket, &gamesavailable, sizeof(gamesavailable))) {
gamesavailable = SDL_SwapBE32(gamesavailable);
}
debug( LOG_NET, "receiving info of %d game(s)\n", gamesavailable );
debug( LOG_NET, "receiving info of %u game(s)\n", gamesavailable );
do {
if ( SDLNet_CheckSockets(socket_set, 1000) > 0