X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_nethandler.pas;h=67b50dd928a87af7ac0e0ac768a39f61e64da93c;hp=b8d7c8040b1cd58cff7f22eb5f45b7d77b550c08;hb=907f02bbf5d1e65c2ce052d883d522e30e7c7a8f;hpb=4ecfaa7da77e39e45d45762f31362082a5616dec diff --git a/src/game/g_nethandler.pas b/src/game/g_nethandler.pas index b8d7c80..67b50dd 100644 --- a/src/game/g_nethandler.pas +++ b/src/game/g_nethandler.pas @@ -42,6 +42,8 @@ begin while RawPos < P^.dataLength do begin Len := e_Raw_Read_Word(B); + if Len = 0 then break; + MID := e_Raw_Read_Byte(B); case MID of NET_MSG_CHAT: MC_RECV_Chat(B); @@ -103,6 +105,8 @@ begin while RawPos < P^.dataLength do begin Len := e_Raw_Read_Word(B); + if Len = 0 then break; + MID := e_Raw_Read_Byte(B); case MID of NET_MSG_GEVENT: MC_RECV_GameEvent(B); @@ -136,6 +140,8 @@ begin while RawPos < P^.dataLength do begin Len := e_Raw_Read_Word(B); + if Len = 0 then break; + MID := e_Raw_Read_Byte(B); case MID of NET_MSG_INFO: MH_RECV_Info(S, B);