From 92bf2d8256a5b87e6de9f7305d26148642b68fd2 Mon Sep 17 00:00:00 2001 From: Maxim <46995666+Vincenz099@users.noreply.github.com> Date: Tue, 7 Apr 2020 12:33:26 +0200 Subject: [PATCH] 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. --- win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32.c b/win32.c index 81175a4..687aa9f 100644 --- a/win32.c +++ b/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,