Fix end of range check to not read beyond the allocation.

The counter j is equal to fTeamCount if no matching team was found in
the team array. Therefore using it as an index into the team array was
invalid.
This commit is contained in:
Michael Lotz
2011-12-07 00:10:17 +01:00
parent 5e5eef0b5b
commit f589e913a7
+1 -1
View File
@@ -129,7 +129,7 @@ MemoryBarMenu::Pulse()
j++; j++;
} }
if (infos.team_info.team != fTeamList[j]) { if (j == fTeamCount) {
// new team // new team
team_info info; team_info info;
j = 0; j = 0;