Browse Source

Tiny cleanup

habeebweeb 4 years ago
parent
commit
cb47f10a87

+ 1 - 1
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Controls/DropDown.cs

@@ -37,7 +37,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             get => selectedItemIndex;
             set
             {
-                this.selectedItemIndex = Mathf.Clamp(value, 0, DropdownList.Length);
+                this.selectedItemIndex = Mathf.Clamp(value, 0, DropdownList.Length - 1);
                 OnDropdownEvent(SelectionChange);
             }
         }

+ 1 - 1
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/MeidoManager.cs

@@ -23,7 +23,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         public int SelectedMeido
         {
             get => selectedMeido;
-            private set => selectedMeido = Mathf.Clamp(value, 0, ActiveMeidoList.Count);
+            private set => selectedMeido = Mathf.Clamp(value, 0, ActiveMeidoList.Count - 1);
         }
         public bool IsBusy
         {