avm1: CallFunction can resolve variable paths

This commit is contained in:
Mike Welsh 2020-06-13 02:08:24 -07:00
parent 29dc88ec01
commit 35a4c05923
1 changed files with 2 additions and 6 deletions

View File

@ -1233,13 +1233,9 @@ impl<'gc> Avm1<'gc> {
}
let target_fn = self
.stack_frames
.last()
.unwrap()
.clone()
.read()
.resolve(fn_name.as_string()?, self, context)?
.get_variable(context, &fn_name.as_string()?)?
.resolve(self, context)?;
let this = self.target_clip_or_root().object().as_object()?;
let result = target_fn.call(self, context, this, None, &args)?;
self.push(result);