Przeglądaj źródła

fix PopupMenu::checkItem filter
reminder size is the total element count of the vector

AzaezelX 8 miesięcy temu
rodzic
commit
c04eaa5862
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      Engine/source/gui/editor/popupMenu.cpp

+ 1 - 1
Engine/source/gui/editor/popupMenu.cpp

@@ -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)