Fix textcmd scanning for zero length netcmds

This commit is contained in:
James R 2021-09-03 17:39:06 -07:00
parent 6e1463e399
commit 896f6cf48a

View file

@ -448,7 +448,7 @@ static void ExtraDataTicker(void)
UINT8 *curpos = textcmd->cmd; UINT8 *curpos = textcmd->cmd;
UINT8 *bufferend = &curpos[textcmd->length]; UINT8 *bufferend = &curpos[textcmd->length];
while (curpos + NETCMD_HEADER_SIZE < bufferend) while (curpos + NETCMD_HEADER_SIZE <= bufferend)
{ {
const UINT8 id = curpos[netcmd_type]; const UINT8 id = curpos[netcmd_type];
const UINT8 length = curpos[netcmd_length]; const UINT8 length = curpos[netcmd_length];