aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-02 22:25:12 +0100
committerEugene Sandulenko2019-12-02 23:22:26 +0100
commit07e615c31b0243942738ad5b138127e7ea9d9709 (patch)
tree0675861bfc9a6f753c28596683dbe5b4ceb7cbd0 /engines
parent354c69c0d9e987e16e89f9f5cef29f623ce95858 (diff)
downloadscummvm-rg350-07e615c31b0243942738ad5b138127e7ea9d9709.tar.gz
scummvm-rg350-07e615c31b0243942738ad5b138127e7ea9d9709.tar.bz2
scummvm-rg350-07e615c31b0243942738ad5b138127e7ea9d9709.zip
DIRECTOR: LINGO: Fix splitting of the script by definitions
Diffstat (limited to 'engines')
-rw-r--r--engines/director/lingo/lingo.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 36a7a1108b..dd0041d7fb 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -93,22 +93,22 @@ const char *Lingo::findNextDefinition(const char *s) {
if (!*res)
return NULL;
- if (!strncmp(res, "macro ", 6)) {
+ if (!scumm_strnicmp(res, "macro ", 6)) {
debugC(1, kDebugLingoCompile, "findNextDefinition(): See 'macros ' construct");
return res;
}
- if (!strncmp(res, "on ", 3)) {
+ if (!scumm_strnicmp(res, "on ", 3)) {
debugC(1, kDebugLingoCompile, "findNextDefinition(): See 'on ' construct");
return res;
}
- if (!strncmp(res, "factory ", 8)) {
+ if (!scumm_strnicmp(res, "factory ", 8)) {
debugC(1, kDebugLingoCompile, "findNextDefinition(): See 'factory ' construct");
return res;
}
- if (!strncmp(res, "method ", 7)) {
+ if (!scumm_strnicmp(res, "method ", 7)) {
debugC(1, kDebugLingoCompile, "findNextDefinition(): See 'method ' construct");
return res;
}
@@ -163,9 +163,9 @@ void Lingo::addCode(const char *code, ScriptType type, uint16 id) {
do {
Common::String chunk(begin, end);
- if (chunk.hasPrefix("factory") || chunk.hasPrefix("method"))
+ if (chunk.hasPrefixIgnoreCase("factory") || chunk.hasPrefixIgnoreCase("method"))
_inFactory = true;
- else if (chunk.hasPrefix("macro") || chunk.hasPrefix("on"))
+ else if (chunk.hasPrefixIgnoreCase("macro") || chunk.hasPrefixIgnoreCase("on"))
_inFactory = false;
else
_inFactory = false;