From 73242aa5bc15746572c183b24c77e7fb20c023a0 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 31 Jan 2016 18:10:58 -0500 Subject: SHERLOCK: SS: Fix incorrect conversation lines display in German version --- engines/sherlock/fonts.cpp | 2 +- engines/sherlock/scalpel/scalpel_talk.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp index 9b58eea17c..431159ca81 100644 --- a/engines/sherlock/fonts.cpp +++ b/engines/sherlock/fonts.cpp @@ -130,7 +130,7 @@ void Fonts::setFont(int fontNum) { // Iterate through the frames to find the widest and tallest font characters _fontHeight = _widestChar = 0; - for (uint idx = 0; idx < _charCount; ++idx) { + for (uint idx = 0; idx < MIN((int)_charCount, 128 - 32); ++idx) { _fontHeight = MAX((uint16)_fontHeight, (*_font)[idx]._frame.h); _widestChar = MAX((uint16)_widestChar, (*_font)[idx]._frame.w); } diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp index be2baf9184..b6e9482e3c 100644 --- a/engines/sherlock/scalpel/scalpel_talk.cpp +++ b/engines/sherlock/scalpel/scalpel_talk.cpp @@ -276,7 +276,7 @@ void ScalpelTalk::talkInterface(const byte *&str) { str += idx; // If line wrap occurred, then move to after the separating space between the words - if ((!isOpcode(str[0])) && str[0] != '{') + if (str[0] && (!isOpcode(str[0])) && str[0] != '{') ++str; _yp += 9; -- cgit v1.2.3