[Scummvm-git-logs] scummvm master -> 3aa660f4c7a4c427c895e6f45a0cf0021dd02d26
sev-
sev at scummvm.org
Wed Feb 8 18:35:01 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3aa660f4c7 DIRECTOR: Lingo: Fix macro definition
Commit: 3aa660f4c7a4c427c895e6f45a0cf0021dd02d26
https://github.com/scummvm/scummvm/commit/3aa660f4c7a4c427c895e6f45a0cf0021dd02d26
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-08T18:21:46+01:00
Commit Message:
DIRECTOR: Lingo: Fix macro definition
Changed paths:
engines/director/lingo/lingo-codegen.cpp
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index dccb95e..65f2b2d 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -196,8 +196,7 @@ void Lingo::cleanLocalVars() {
for (SymbolHash::const_iterator h = _localvars->begin(); h != _localvars->end(); ++h) {
if (!h->_value->global) {
- Symbol *sym = h->_value;
- delete sym;
+ delete h->_value;
}
}
@@ -219,7 +218,11 @@ void Lingo::define(Common::String &name, int start, int nargs, Common::String *p
sym->name = name;
sym->type = HANDLER;
- _handlers[ENTITY_INDEX(_eventHandlerTypeIds[name.c_str()], _currentEntityId)] = sym;
+ if (!_eventHandlerTypeIds.contains(name)) {
+ _builtins[name] = sym;
+ } else {
+ _handlers[ENTITY_INDEX(_eventHandlerTypeIds[name.c_str()], _currentEntityId)] = sym;
+ }
} else {
//we don't want to be here. The getHandler call should have used the EntityId and the result
//should have been unique!
More information about the Scummvm-git-logs
mailing list