From 65ec35b73271bfbb1c14ba8638d948d6beb1d322 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 8 Oct 2024 22:44:39 +0300 Subject: [PATCH] engine: client: fix bug in temp entity parsing caused by find and replace --- engine/client/cl_tent.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/client/cl_tent.c b/engine/client/cl_tent.c index 0cb98da4..6c0f09fd 100644 --- a/engine/client/cl_tent.c +++ b/engine/client/cl_tent.c @@ -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 {