GLK: QUEST: Fix crash printing formatted strings

This commit is contained in:
Paul Gilbert 2019-09-29 11:33:24 -07:00
parent 055f6f0b48
commit 97e61ddb0e

View File

@ -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;
}
}