diff options
author | D G Turner | 2019-10-05 00:31:11 +0100 |
---|---|---|
committer | D G Turner | 2019-10-05 00:31:11 +0100 |
commit | 452b380976bd27874b42087b835007d880b75c08 (patch) | |
tree | 45d2cae1b6d4fda8d1f824194147021c9a996e8a /graphics/macgui | |
parent | 4137a7e402344a007e14cfac0dab5c84526c1f34 (diff) | |
download | scummvm-rg350-452b380976bd27874b42087b835007d880b75c08.tar.gz scummvm-rg350-452b380976bd27874b42087b835007d880b75c08.tar.bz2 scummvm-rg350-452b380976bd27874b42087b835007d880b75c08.zip |
GRAPHICS: MACGUI: Fix GCC Signed vs. Unsigned Warnings
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/macmenu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index d4543e3cfc..2f95d012d5 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -332,11 +332,11 @@ MacMenuSubMenu *MacMenu::addSubMenu(MacMenuSubMenu *submenu, int index) { MacMenuSubMenu *MacMenu::getSubmenu(MacMenuSubMenu *submenu, int index) { if (submenu == nullptr) { - if (index >= _items.size()) + if (index < 0 || (uint)index >= _items.size()) return nullptr; return _items[index]->submenu; } else { - if (index >= submenu->items.size()) + if (index < 0 || (uint)index >= submenu->items.size()) return nullptr; return submenu->items[index]->submenu; } |