aboutsummaryrefslogtreecommitdiff
path: root/engines/glk
diff options
context:
space:
mode:
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;
}
}