From 4cce54efee1779d4374a6e218649e186408f6816 Mon Sep 17 00:00:00 2001 From: athrxx Date: Sat, 3 Nov 2018 00:03:32 +0100 Subject: KYRA: (EOB) - fix load menu graphics glitch Cut off long save slot descriptions from the GMM save dialogue when they're displayed in the original load menu. --- engines/kyra/gui_eob.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp index 1e4fc4388e..4b1002175b 100644 --- a/engines/kyra/gui_eob.cpp +++ b/engines/kyra/gui_eob.cpp @@ -4102,8 +4102,9 @@ void GUI_EoB::drawSaveSlotButton(int slot, int redrawBox, int textCol) { int x = _saveSlotX + 4; int y = _saveSlotY + slot * 17 + 20; int w = 167; - const char *s = (slot < 6) ? _saveSlotStringsTemp[slot] : _vm->_saveLoadStrings[0]; - + char slotString[26]; + Common::strlcpy(slotString, slot < 6 ? _saveSlotStringsTemp[slot] : _vm->_saveLoadStrings[0], _vm->gameFlags().platform == Common::kPlatformFMTowns ? 25 : 20); + if (slot >= 6) { x = _saveSlotX + 118; y = _saveSlotY + 126; @@ -4119,7 +4120,7 @@ void GUI_EoB::drawSaveSlotButton(int slot, int redrawBox, int textCol) { y++; } - _screen->printShadedText(s, x + 4, y + 3, textCol, 0); + _screen->printShadedText(slotString, x + 4, y + 3, textCol, 0); _vm->screen()->setFont(fnt); } -- cgit v1.2.3