Skip to content

Commit

Permalink
Out-of-bounds access to assignments should not crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Jan 2, 2025
1 parent 3d33ecc commit 15e120a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BossMod/Config/GroupAssignment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class GroupAssignment

public int this[PartyRolesConfig.Assignment r]
{
get => Assignments[(int)r];
get => (int)r is var index && index >= 0 && index < Assignments.Length ? Assignments[index] : -1;
set => Assignments[(int)r] = value;
}

Expand Down

0 comments on commit 15e120a

Please sign in to comment.