Holy87 Options - Bugfixing

Script link: https://forums.rpgmakerweb.com/index.php?threads/settings-menu.43612/
User seems to be inactive.

There's an option in the script to give a variable's values names; in the screenshot below I just use the script's default example for this type of variable display.
If you scroll too far to the left or right and try to go back to the first/last options, you'll end up selecting nothing:
upload_2019-4-6_13-34-17.png

This only happens when you specify titles for variable values; if you just display numerical variable values on the option menu, the cursor works properly. Same goes for the "popup" variable display.

I could be completely wrong, but I think here are the lines that need to be fixed/adjusted:
upload_2019-4-6_13-50-21.png


(Please don't recommend me to try other option menus: I've used Yanfly's and Vlue's, but their options are a bit limited in terms of customization for variable-based options.)

Demo attached below, you can try it for yourself. This issue has been driving me insane, so some help would be nice.
Line 572
@max = @values.size - 1

Don't know why but it seems that the @values.size returns 1 extra than the actual size.
putting in the - 1 makes it work.

*edit
Maybe it's counting by starting at 1. easy, normal, hard, 1,2,3. ??
Line 572
@max = @values.size - 1

Don't know why but it seems that the @values.size returns 1 extra than the actual size.
putting in the - 1 makes it work.

*edit
Maybe it's counting by starting at 1. easy, normal, hard, 1,2,3. ??
Values are 0,1,2 = so 0 is a value possibility here, for all variable display types.
That's one of the simplest fixes I've ever seen to any bug. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/holy87-options-bugfixing.107668/