From 6aa5566a0f67a033ff02ae47a4c21aa3edc3c3ec Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 5 Oct 2015 22:19:46 -0400 Subject: SHERLOCK: SS: Fix German conversation crash The crash occurred due to the presense of a single character printable string between two script opcodes --- engines/sherlock/journal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sherlock') diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index e442a3c903..44b966f70b 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -485,9 +485,9 @@ void Journal::loadJournalFile(bool alreadyLoaded) { // Copy text from the place until either the reply ends, a comment // {} block is started, or a control character is encountered journalString += c; - do { + while (*replyP && *replyP < opcodes[0] && *replyP != '{' && *replyP != '}') { journalString += *replyP++; - } while (*replyP && *replyP < opcodes[0] && *replyP != '{' && *replyP != '}'); + } commentJustPrinted = false; } -- cgit v1.2.3