From d828868bc89fb39f8753e2c066ceee1f0db6b8b6 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 11 Oct 2023 00:56:54 -0500 Subject: [PATCH] Fix uninitialized channel and packet flags in split UTF-8 packets --- src/InputStream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/InputStream.c b/src/InputStream.c index 68f8509..73cd570 100644 --- a/src/InputStream.c +++ b/src/InputStream.c @@ -594,8 +594,9 @@ static void inputSendThreadProc(void* context) { break; } + // Use the original packet as a template and fixup to send one code point at a time + splitPacket = *holder; splitPacket.packet.unicode.header.size = BE32(sizeof(uint32_t) + codePointLength); - splitPacket.packet.unicode.header.magic = LE32(UTF8_TEXT_EVENT_MAGIC); memcpy(splitPacket.packet.unicode.text, &holder->packet.unicode.text[i], codePointLength); // Encrypt and send the split packet