mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 14:29:05 -07:00
Make recvLength = 0; In the rare case of it having bogus data.
I noticed from testing this that this might be the source of it, I once had a package returned with length total bogus. like 982349829 or something like that, it crashed my game, I suspect this is the source.
This commit is contained in:
parent
33c7d6903e
commit
92bf2d8256
1 changed files with 1 additions and 1 deletions
2
win32.c
2
win32.c
|
@ -354,7 +354,7 @@ enet_socket_receive (ENetSocket socket,
|
|||
{
|
||||
INT sinLength = sizeof (struct sockaddr_in);
|
||||
DWORD flags = 0,
|
||||
recvLength;
|
||||
recvLength = 0;
|
||||
struct sockaddr_in sin;
|
||||
|
||||
if (WSARecvFrom (socket,
|
||||
|
|
Loading…
Reference in a new issue