From 95107a268532d42885ffc91201c51362ca461e3f Mon Sep 17 00:00:00 2001 From: PS Date: Thu, 8 Apr 2021 13:46:08 -1000 Subject: [PATCH] Guarding against empty network packets --- src/app/ss_blumen_lumen/blumen_lumen.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/ss_blumen_lumen/blumen_lumen.cpp b/src/app/ss_blumen_lumen/blumen_lumen.cpp index a257bf4..f12a54e 100644 --- a/src/app/ss_blumen_lumen/blumen_lumen.cpp +++ b/src/app/ss_blumen_lumen/blumen_lumen.cpp @@ -404,6 +404,7 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context) while (MessageQueue_CanRead(BLState->IncomingMsgQueue)) { gs_data PacketData = MessageQueue_Read(&BLState->IncomingMsgQueue); + if (PacketData.Memory == 0) continue; blumen_packet Packet = *(blumen_packet*)PacketData.Memory; switch (Packet.Type) {