diff options
author | Maxim <[email protected]> | 2020-04-07 13:02:48 +0200 |
---|---|---|
committer | Maxim <[email protected]> | 2020-04-07 13:02:48 +0200 |
commit | 67cee4803a3338f0ee2e049ceac215925b9cd908 (patch) | |
tree | 80767470cc5502bfc680cbcf86ce6990ff2c8e17 | |
parent | 007b7d2a3f81505f615eda40f6795b95a2208bee (diff) | |
download | enet-67cee4803a3338f0ee2e049ceac215925b9cd908.tar.gz enet-67cee4803a3338f0ee2e049ceac215925b9cd908.zip |
Set DWORD sentLength = 0;
Same case like receive, we should initialize this variable.
-rw-r--r-- | unix.c | 2 | ||||
-rw-r--r-- | win32.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -475,7 +475,7 @@ enet_socket_receive (ENetSocket socket, { struct msghdr msgHdr; struct sockaddr_in sin; - int recvLength = 0; + int recvLength; memset (& msgHdr, 0, sizeof (struct msghdr)); @@ -316,7 +316,7 @@ enet_socket_send (ENetSocket socket, size_t bufferCount) { struct sockaddr_in sin; - DWORD sentLength; + DWORD sentLength = 0; if (address != NULL) { |