Explorar o código

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.
Maxim %!s(int64=5) %!d(string=hai) anos
pai
achega
92bf2d8256
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      win32.c

+ 1 - 1
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,