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:
Maxim 2020-04-07 12:33:26 +02:00 committed by GitHub
parent 33c7d6903e
commit 92bf2d8256
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,