diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-02-08 20:14:01 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-02-08 20:15:08 +0100 |
commit | d5a1c55d37e961e95f8439249b31dca7eec81e2d (patch) | |
tree | bf2a18e2d7df2c444a338eea38aa56a2de74f64f /src/game/g_combat.c | |
parent | ab724678a4403f64d731cecbe9ded904af4310b6 (diff) |
Fix a segfault in G_CalculateCombatRanks.
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r-- | src/game/g_combat.c | 6 |
1 files 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 || |