From d5a1c55d37e961e95f8439249b31dca7eec81e2d Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sun, 8 Feb 2015 20:14:01 +0100 Subject: Fix a segfault in G_CalculateCombatRanks. --- src/game/g_combat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/g_combat.c b/src/game/g_combat.c index b02ac3e..13441ac 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -1881,7 +1881,7 @@ void G_CombatStats_HitMOD( gentity_t *ent, gentity_t *hit, meansOfDeath_t mod, i /* ================ -G_CalculateCombatRanking +G_CalculateCombatRanks ================ */ @@ -1902,7 +1902,7 @@ void G_CalculateCombatRanks( void ) combatStatsWeapon_t weapon; combatStats_t *stats; combatRanks_t *ranks; - int i, sample_count = 0, rank; + int i, sample_count, rank; csrSample_t samples[ MAX_CLIENTS ]; float last; @@ -1913,7 +1913,7 @@ void G_CalculateCombatRanks( void ) for( weapon = CSW_UNKNOWN + 1; weapon < CSW_MAX; weapon++ ) { - for( ent = g_entities; ent < g_entities + MAX_CLIENTS; ent++ ) + for( sample_count = 0, ent = g_entities; ent < g_entities + MAX_CLIENTS; ent++ ) { if( !ent->inuse || !ent->client || -- cgit