From cd2cfac16e52996eab89379920cff5d793f4e1a4 Mon Sep 17 00:00:00 2001 From: PS Date: Thu, 8 Apr 2021 13:54:26 -1000 Subject: [PATCH] preventing reading from past the end of the message queue --- src/app/ss_blumen_lumen/message_queue.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/ss_blumen_lumen/message_queue.cpp b/src/app/ss_blumen_lumen/message_queue.cpp index ba974de..a132d64 100644 --- a/src/app/ss_blumen_lumen/message_queue.cpp +++ b/src/app/ss_blumen_lumen/message_queue.cpp @@ -64,6 +64,7 @@ MessageQueue_Read(blumen_network_msg_queue* Queue) if (ReadIndex >= BLUMEN_MESSAGE_QUEUE_COUNT) { Queue->ReadHead = 0; + ReadIndex = 0; } Result = Queue->Buffers[ReadIndex]; return Result;