Skip to content

Commit

Permalink
ACTIONSCRIPT: Add missing register pushs to object method call
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius authored and DrMcCoy committed Aug 7, 2020
1 parent 3e51c0d commit 6a6dc51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/aurora/actionscript/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ Variable Object::call(const Common::UString &function, AVM &avm, const std::vect
throw Common::Exception("Object is no function");
}

avm.pushRegisters(f->getNumRegisters());

byte counter = 1;
if (f->getPreloadRootFlag()) {
avm.storeRegister(avm.getVariable("_root"), counter);
Expand All @@ -123,6 +125,9 @@ Variable Object::call(const Common::UString &function, AVM &avm, const std::vect

avm.setReturnValue();
(*f)(avm);

avm.popRegisters(f->getNumRegisters());

return avm.getReturnValue();
}

Expand Down

0 comments on commit 6a6dc51

Please sign in to comment.