Monday, May 12, 2008

inconsistency in sdl_net

just discovered a trap in sdl_net on little endian system. sdl_net used 2 endian system in it's api!!?, if you use SDL_XXX_OPEN(), you should enter the port number follow the endian of your system. but when u set destination address in UDPpacket, you must always convert it to big endian! this took me 1 Sunday to find out

No comments: