fix PopupMenu::checkItem filter

reminder size is the total element count of the vector
This commit is contained in:
AzaezelX 2025-04-29 15:45:39 -05:00
parent 2852b33cec
commit c04eaa5862

View file

@ -230,7 +230,7 @@ void PopupMenu::enableItem(S32 pos, bool enable)
void PopupMenu::checkItem(S32 pos, bool checked)
{
if (mMenuItems.empty() || mMenuItems.size() < pos || pos < 0)
if (mMenuItems.empty() || mMenuItems.size() <= pos || pos < 0)
return;
if (checked && mMenuItems[pos].mCheckGroup != -1 && mRadioSelection)