Off-the-end execution should implicitly return undefined if there's another stack frame to run.

This commit is contained in:
David Wendt 2019-09-16 19:54:17 -04:00 committed by Mike Welsh
parent edc37dee5d
commit 13a88143d6
1 changed files with 2 additions and 1 deletions

View File

@ -376,8 +376,9 @@ impl<'gc> Avm1<'gc> {
return result;
}
} else {
//Out of code. Return to the parent function.
//Implicit return undefined
self.retire_stack_frame();
self.current_stack_frame_mut().map(|sf| sf.stack_mut().push(Value::Undefined));
}
Ok(())