Skip to content

Commit

Permalink
fix: fcps index oob
Browse files Browse the repository at this point in the history
for some reason this doesn't crash for me, but this feature is just riddled with potential places this could happen
relevant thread (p2sr) https://discord.com/channels/146404426746167296/1247646622217932924/1247646622217932924
  • Loading branch information
ThisAMJ committed Jun 11, 2024
1 parent 043e5d6 commit ce15c4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Features/FCPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ CON_COMMAND(sar_fcps_anim_start, "sar_fcps_anim_start <id> - start animating the
idx += g_events.size();
}

if (idx < 0 || idx > (int)g_events.size()) {
if (idx < 0 || idx >= (int)g_events.size()) {
console->Print("No such FCPS event!\n");
return;
}
Expand Down

0 comments on commit ce15c4b

Please sign in to comment.