engine: client: fix bug in temp entity parsing caused by find and replace
This commit is contained in:
parent
8d731b5d15
commit
65ec35b732
1 changed files with 4 additions and 4 deletions
|
@ -1916,16 +1916,16 @@ void CL_ParseTempEntity( sizebuf_t *msg, connprotocol_t proto )
|
|||
else iSize = MSG_ReadWord( msg );
|
||||
|
||||
// this will probably be fatal anyway
|
||||
if( iSize > sizeof( pbuf ))
|
||||
if( iSize > sizeof( msg_data ))
|
||||
Con_Printf( S_ERROR "%s: Temp buffer overflow!\n", __func__ );
|
||||
|
||||
// parse user message into buffer
|
||||
MSG_ReadBytes( msg, pbuf, iSize );
|
||||
MSG_ReadBytes( msg, msg_data, iSize );
|
||||
|
||||
// init a safe tempbuffer
|
||||
MSG_Init( pbuf, "TempEntity", pbuf, iSize );
|
||||
MSG_Init( &buf, "TempEntity", msg_data, iSize );
|
||||
|
||||
pbuf = pbuf;
|
||||
pbuf = &buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue