fix array index out of bounds
This commit is contained in:
parent
b722808d70
commit
b969946fc4
|
@ -134,7 +134,7 @@ public class OptionsOverlay {
|
|||
return true;
|
||||
}
|
||||
int idx = getOptionIdxAt(y);
|
||||
if (idx < options.length) {
|
||||
if (idx >= 0 && idx < options.length) {
|
||||
final Options.GameOption option = options[idx];
|
||||
selectedOption = option;
|
||||
Object[] listItems = option.getListItems();
|
||||
|
|
Loading…
Reference in New Issue
Block a user