aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-10-05 22:19:46 -0400
committerPaul Gilbert2015-10-05 22:19:46 -0400
commit6aa5566a0f67a033ff02ae47a4c21aa3edc3c3ec (patch)
tree2d98b1fa157b7a92bcb771c07c994a5b15bf987a /engines/sherlock
parent12227fb6f8f69407d8b513ab692fa590f1caa180 (diff)
downloadscummvm-rg350-6aa5566a0f67a033ff02ae47a4c21aa3edc3c3ec.tar.gz
scummvm-rg350-6aa5566a0f67a033ff02ae47a4c21aa3edc3c3ec.tar.bz2
scummvm-rg350-6aa5566a0f67a033ff02ae47a4c21aa3edc3c3ec.zip
SHERLOCK: SS: Fix German conversation crash
The crash occurred due to the presense of a single character printable string between two script opcodes
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/journal.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}