From 21730e9d7e4a7fbaa1bb437f3699e3a9e27a6e7d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 17 Jul 2016 23:26:04 +0300 Subject: DIRECTOR: Lingo: Cast references could be lowercase too --- engines/director/lingo/lingo-codegen.cpp | 4 ++-- 1 file 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; -- cgit v1.2.3