diff options
author | Maxim <[email protected]> | 2020-04-07 12:33:26 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-07 12:33:26 +0200 |
commit | 92bf2d8256a5b87e6de9f7305d26148642b68fd2 (patch) | |
tree | ce9297a53efb01af2cf8de1de2f384715afa78e1 /win32.c | |
parent | 33c7d6903e843d450eb18769d5802e83de538825 (diff) | |
download | enet-92bf2d8256a5b87e6de9f7305d26148642b68fd2.tar.gz enet-92bf2d8256a5b87e6de9f7305d26148642b68fd2.zip |
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.
Diffstat (limited to 'win32.c')
-rw-r--r-- | win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, |