diff options
Diffstat (limited to 'engines/director/lingo/lingo-codegen.cpp')
-rw-r--r-- | engines/director/lingo/lingo-codegen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp index 553213cc33..b54953e9f3 100644 --- a/engines/director/lingo/lingo-codegen.cpp +++ b/engines/director/lingo/lingo-codegen.cpp @@ -124,13 +124,13 @@ void Lingo::cleanLocalVars() { } void Lingo::define(Common::String &name, int start, int nargs, Common::String *prefix) { - debug(3, "define(\"%s\", %d, %d, %d)", name.c_str(), start, _currentScript->size() - 1, nargs); - Symbol *sym; if (prefix) name = *prefix + "-" + name; + debug(3, "define(\"%s\", %d, %d, %d)", name.c_str(), start, _currentScript->size() - 1, nargs); + if (!_handlers.contains(name)) { // Create variable if it was not defined sym = new Symbol; |