From f050b13b6a3d61e132ba10ab611cf1949aa0fca7 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 1 Nov 2026 15:11:58 -0600 Subject: [PATCH] Add explicit cast to make MSVC happy --- src/ControlStream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ControlStream.c b/src/ControlStream.c index e8996f9..5db6067 100644 --- a/src/ControlStream.c +++ b/src/ControlStream.c @@ -823,7 +823,7 @@ static bool sendMessageEnet(short ptype, unsigned int paylen, const void* payloa encPacket = (PNVCTL_ENCRYPTED_PACKET_HEADER)enetPacket->data; encPacket->encryptedHeaderType = 0x0001; - encPacket->length = sizeof(encPacket->seq) + AES_GCM_TAG_LENGTH + sizeof(*packet) + paylen; + encPacket->length = (unsigned short)(sizeof(encPacket->seq) + AES_GCM_TAG_LENGTH + sizeof(*packet) + paylen); encPacket->seq = currentEnetSequenceNumber++; // Construct the plaintext data for encryption