Преглед изворни кода

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 пре 5 година
родитељ
комит
92bf2d8256
1 измењених фајлова са 1 додато и 1 уклоњено
  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,