Fixed "Swap" only working for i32

This commit is contained in:
bbb651 2020-12-03 23:41:44 +02:00 committed by Mike Welsh
parent 8baf35e7af
commit 92bd0874e1
1 changed files with 2 additions and 2 deletions

View File

@ -1733,8 +1733,8 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
}
fn op_swap(&mut self) -> Result<FrameControl<'gc>, Error> {
let value2 = self.context.avm2.pop().coerce_to_i32(self)?;
let value1 = self.context.avm2.pop().coerce_to_i32(self)?;
let value2 = self.context.avm2.pop();
let value1 = self.context.avm2.pop();
self.context.avm2.push(value2);
self.context.avm2.push(value1);