aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-31 17:16:47 +0100
committerEugene Sandulenko2019-12-31 17:16:47 +0100
commitfc35b122c1529b89a730dac836d25bd7ba3d415b (patch)
tree461b65d39165e0561956892c09a412c5c70e4d98
parent7989d65b26fa0788db05c8a9f49d7be4cab80722 (diff)
downloadscummvm-rg350-fc35b122c1529b89a730dac836d25bd7ba3d415b.tar.gz
scummvm-rg350-fc35b122c1529b89a730dac836d25bd7ba3d415b.tar.bz2
scummvm-rg350-fc35b122c1529b89a730dac836d25bd7ba3d415b.zip
DIRECTOR: LINGO: Avoid reading past buffer in the preprocessor
-rw-r--r--engines/director/lingo/lingo-preprocessor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-preprocessor.cpp b/engines/director/lingo/lingo-preprocessor.cpp
index fd9cab91ff..5e63f306b6 100644
--- a/engines/director/lingo/lingo-preprocessor.cpp
+++ b/engines/director/lingo/lingo-preprocessor.cpp
@@ -83,7 +83,8 @@ Common::String Lingo::codePreprocessor(const char *s, bool simple) {
else if (*s)
res += *s;
- s++;
+ if (*s)
+ s++;
}
Common::String tmp(res);