preventing reading from past the end of the message queue
This commit is contained in:
parent
95107a2685
commit
cd2cfac16e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue