2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 18:07:09 +01:00

engine: client: fix array overruns

This commit is contained in:
Alibek Omarov 2022-05-25 03:36:23 +03:00
parent fd83b0dc17
commit ac40badaa5
2 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ CL_EventIndex
*/
word CL_EventIndex( const char *name )
{
int i;
word i;
if( !COM_CheckString( name ))
return 0;
@ -484,7 +484,7 @@ void GAME_EXPORT CL_PlaybackEvent( int flags, const edict_t *pInvoker, word even
return;
// first check event for out of bounds
if( eventindex < 1 || eventindex > MAX_EVENTS )
if( eventindex < 1 || eventindex >= MAX_EVENTS )
{
Con_DPrintf( S_ERROR "CL_PlaybackEvent: invalid eventindex %i\n", eventindex );
return;

View File

@ -222,7 +222,7 @@ void CL_UpdateLatchedVars( cl_entity_t *ent )
if( ent->curstate.sequence != ent->prevstate.sequence )
{
memcpy( ent->latched.prevseqblending, ent->prevstate.blending, sizeof( ent->prevstate.blending ));
memcpy( ent->latched.prevseqblending, ent->prevstate.blending, sizeof( ent->latched.prevseqblending ));
ent->latched.prevsequence = ent->prevstate.sequence;
ent->latched.sequencetime = ent->curstate.animtime;
}