From 67cee4803a3338f0ee2e049ceac215925b9cd908 Mon Sep 17 00:00:00 2001 From: Maxim <46995666+Vincenz099@users.noreply.github.com> Date: Tue, 7 Apr 2020 13:02:48 +0200 Subject: [PATCH] Set DWORD sentLength = 0; Same case like receive, we should initialize this variable. --- unix.c | 2 +- win32.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unix.c b/unix.c index acb05c3..a636f03 100644 --- a/unix.c +++ b/unix.c @@ -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)); diff --git a/win32.c b/win32.c index 687aa9f..eebdb03 100644 --- a/win32.c +++ b/win32.c @@ -316,7 +316,7 @@ enet_socket_send (ENetSocket socket, size_t bufferCount) { struct sockaddr_in sin; - DWORD sentLength; + DWORD sentLength = 0; if (address != NULL) {