From b97a7e25836d15003c1e7fd0fc60c10f195f642a Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Mon, 2 May 2011 15:57:02 +0000 Subject: [PATCH] Fix out of bounds array index (#4960) patch by Ben Millwood --- code/botlib/be_ai_move.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/botlib/be_ai_move.c b/code/botlib/be_ai_move.c index 8ee4ad96..294fc257 100644 --- a/code/botlib/be_ai_move.c +++ b/code/botlib/be_ai_move.c @@ -3509,7 +3509,7 @@ void BotResetLastAvoidReach(int movestate) if (latesttime) { ms->avoidreachtimes[latest] = 0; - if (ms->avoidreachtries[i] > 0) ms->avoidreachtries[latest]--; + if (ms->avoidreachtries[latest] > 0) ms->avoidreachtries[latest]--; } //end if } //end of the function BotResetLastAvoidReach //===========================================================================