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:
@@ -129,7 +129,7 @@ MemoryBarMenu::Pulse()
|
||||
j++;
|
||||
}
|
||||
|
||||
if (infos.team_info.team != fTeamList[j]) {
|
||||
if (j == fTeamCount) {
|
||||
// new team
|
||||
team_info info;
|
||||
j = 0;
|
||||
|
||||
Reference in New Issue
Block a user