aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-17 23:26:04 +0300
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commit21730e9d7e4a7fbaa1bb437f3699e3a9e27a6e7d (patch)
tree25d783fbb6a55746434c6f29ec97a071a3901126
parent9172820158e9ac069a1bb9bf4472dc1e64e2a6e3 (diff)
downloadscummvm-rg350-21730e9d7e4a7fbaa1bb437f3699e3a9e27a6e7d.tar.gz
scummvm-rg350-21730e9d7e4a7fbaa1bb437f3699e3a9e27a6e7d.tar.bz2
scummvm-rg350-21730e9d7e4a7fbaa1bb437f3699e3a9e27a6e7d.zip
DIRECTOR: Lingo: Cast references could be lowercase too
-rw-r--r--engines/director/lingo/lingo-codegen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index b54953e9f3..21501bf2a3 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -70,14 +70,14 @@ Symbol *Lingo::lookupVar(const char *name, bool create, bool putInGlobalList) {
// Looking for the cast member constants
if (_vm->getVersion() < 4) { // TODO: There could be a flag 'Allow Outdated Lingo' in Movie Info in D4
if (strlen(name) == 3) {
- if (name[0] >= 'A' && name[0] <= 'H' &&
+ if (tolower(name[0]) >= 'a' && tolower(name[0]) <= 'h' &&
name[1] >= '1' && name[1] <= '8' &&
name[2] >= '1' && name[2] <= '8') {
if (!create)
error("Cast reference used in wrong context: %s", name);
- int val = (name[0] - 'A') * 64 + (name[1] - '1') * 8 + (name[2] - '1') + 1;
+ int val = (tolower(name[0]) - 'a') * 64 + (name[1] - '1') * 8 + (name[2] - '1') + 1;
sym = new Symbol;
sym->type = CASTREF;