aboutsummaryrefslogtreecommitdiff
path: root/engines/glk
diff options
context:
space:
mode:
authorPaul Gilbert2019-09-29 11:33:24 -0700
committerPaul Gilbert2019-09-29 15:08:52 -0700
commit97e61ddb0ecfe410af57687f5b264992033ccf91 (patch)
tree4aaf14d958ca981e9f035546f662f4621117343f /engines/glk
parent055f6f0b483f8f6b285f223ca852392ef320c76f (diff)
downloadscummvm-rg350-97e61ddb0ecfe410af57687f5b264992033ccf91.tar.gz
scummvm-rg350-97e61ddb0ecfe410af57687f5b264992033ccf91.tar.bz2
scummvm-rg350-97e61ddb0ecfe410af57687f5b264992033ccf91.zip
GLK: QUEST: Fix crash printing formatted strings
Diffstat (limited to 'engines/glk')
-rw-r--r--engines/glk/quest/geas_runner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/glk/quest/geas_runner.cpp b/engines/glk/quest/geas_runner.cpp
index f52a89b690..9d4fd32846 100644
--- a/engines/glk/quest/geas_runner.cpp
+++ b/engines/glk/quest/geas_runner.cpp
@@ -3647,7 +3647,7 @@ GeasResult GeasInterface::print_formatted(String s, bool with_newline) {
for (j = i; i != s.length() && s[i] != '|'; i ++)
;
print_normal(s.substr(j, i - j));
- if (s[i] == '|')
+ if (i != s.length() && s[i] == '|')
-- i;
}
}