diff options
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo-codegen.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 53f3a5aa3e..7ab69c025d 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -341,7 +341,7 @@ void Lingo::c_assign() { } bool Lingo::verify(Symbol *s) { - if (s->type != INT && s->type != VOID && s->type != FLOAT && s->type != STRING && s->type != POINT) { + if (s->type != INT && s->type != VOID && s->type != FLOAT && s->type != STRING && s->type != POINT && s->type != SYMBOL) { warning("attempt to evaluate non-variable '%s'", s->name.c_str()); return false; diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp index 94fe7068a4..95501677b7 100644 --- a/engines/director/lingo/lingo-codegen.cpp +++ b/engines/director/lingo/lingo-codegen.cpp @@ -166,6 +166,10 @@ Symbol *Lingo::lookupVar(const char *name, bool create, bool putInGlobalList) { } if (!_localvars || !_localvars->contains(name)) { // Create variable if it was not defined + // Check if it is a global symbol + if (_globalvars.contains(name) && _globalvars[name]->type == SYMBOL) + return _globalvars[name]; + if (!create) return NULL; |