diff --git a/engine/client/cl_events.c b/engine/client/cl_events.c index bcf3f76d..0107a65e 100644 --- a/engine/client/cl_events.c +++ b/engine/client/cl_events.c @@ -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; diff --git a/engine/client/cl_frame.c b/engine/client/cl_frame.c index b86debed..dd1777e6 100644 --- a/engine/client/cl_frame.c +++ b/engine/client/cl_frame.c @@ -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; }