Guarding against empty network packets
This commit is contained in:
parent
114ab0b5d8
commit
95107a2685
|
@ -404,6 +404,7 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
|
||||||
while (MessageQueue_CanRead(BLState->IncomingMsgQueue))
|
while (MessageQueue_CanRead(BLState->IncomingMsgQueue))
|
||||||
{
|
{
|
||||||
gs_data PacketData = MessageQueue_Read(&BLState->IncomingMsgQueue);
|
gs_data PacketData = MessageQueue_Read(&BLState->IncomingMsgQueue);
|
||||||
|
if (PacketData.Memory == 0) continue;
|
||||||
|
|
||||||
blumen_packet Packet = *(blumen_packet*)PacketData.Memory;
|
blumen_packet Packet = *(blumen_packet*)PacketData.Memory;
|
||||||
switch (Packet.Type) {
|
switch (Packet.Type) {
|
||||||
|
|
Loading…
Reference in New Issue