diff options
| author | Eugene Sandulenko | 2016-03-15 10:46:38 +0100 |
|---|---|---|
| committer | Eugene Sandulenko | 2016-03-15 11:27:48 +0100 |
| commit | 2762e693ff5d415030e39c8e72caed1131a56da4 (patch) | |
| tree | 872bab4ae567ee57f080bb86c0a9590dbfab8d57 /engines/wage | |
| parent | ffeda30367d46931c70627e2f91313bf04f8386e (diff) | |
| download | scummvm-rg350-2762e693ff5d415030e39c8e72caed1131a56da4.tar.gz scummvm-rg350-2762e693ff5d415030e39c8e72caed1131a56da4.tar.bz2 scummvm-rg350-2762e693ff5d415030e39c8e72caed1131a56da4.zip | |
WAGE: Better menu shortcut parsing. This fixes Jumble!
Diffstat (limited to 'engines/wage')
| -rw-r--r-- | engines/wage/detection_tables.h | 2 | ||||
| -rw-r--r-- | engines/wage/menu.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h index 7ee19d3974..6533b3bb8d 100644 --- a/engines/wage/detection_tables.h +++ b/engines/wage/detection_tables.h @@ -53,7 +53,7 @@ static const ADGameDescription gameDescriptions[] = { // Crash in console rendering on the first scene FANGAME("Fantasy Quest", "4b0e1a1fbaaa4930accd0f9f0e1519c7", 762754), FANGAME("Find the Heart", "595117cbed33e8de1ab3714b33880205", 106235), // From Joshua's Worlds 1.0 - // Unexpected shortcut in menu + // Problems with window overlay FANGAMEN("Jumble", "LSJUMBLE", "e12ec4d76d48bdc86567c5e63750547e", 647339), // Original file name is "LSJUMBLE†" FANGAME("Karth of the Jungle", "595117cbed33e8de1ab3714b33880205", 96711), FANGAME("Karth of the Jungle", "595117cbed33e8de1ab3714b33880205", 96960), // Alternative version diff --git a/engines/wage/menu.cpp b/engines/wage/menu.cpp index 48f16421b5..12ef8c2219 100644 --- a/engines/wage/menu.cpp +++ b/engines/wage/menu.cpp @@ -206,10 +206,10 @@ void Menu::createCommandsMenu(MenuItem *menu) { char shortcut = 0; const char *shortPtr = strrchr(item.c_str(), '/'); if (shortPtr != NULL) { - if (strlen(shortPtr) == 2) { + if (strlen(shortPtr) >= 2) { shortcut = shortPtr[1]; - item.deleteLastChar(); - item.deleteLastChar(); + item.deleteChar(shortPtr - item.c_str()); + item.deleteChar(shortPtr - item.c_str()); } else { error("Unexpected shortcut: '%s', item '%s' in menu '%s'", shortPtr, item.c_str(), string.c_str()); } |
