diff options
author | Alexander Tkachev | 2016-08-06 16:20:44 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-06 16:20:44 +0600 |
commit | 139ad46410fe0a92a83eabd662caf2165eb498da (patch) | |
tree | 813c2d5b78e4bff19610fa7fcc20695872d087e3 /graphics/macgui | |
parent | f5db38a0015039bc082e63f6cda926d316d363ac (diff) | |
download | scummvm-rg350-139ad46410fe0a92a83eabd662caf2165eb498da.tar.gz scummvm-rg350-139ad46410fe0a92a83eabd662caf2165eb498da.tar.bz2 scummvm-rg350-139ad46410fe0a92a83eabd662caf2165eb498da.zip |
WAGE: Fix crash in Explorer
Caused by operator[] usage on empty string.
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/macmenu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index 6169b3e3cd..a78fa2e6ce 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -249,7 +249,7 @@ void Menu::createSubMenuFromString(int id, const char *str) { Common::String tmpitem(item); tmpitem.trim(); - if (tmpitem[0] == '(') { + if (tmpitem.size() > 0 && tmpitem[0] == '(') { enabled = false; for (uint j = 0; j < item.size(); j++) |