avm1: Fix add2 coerce

This commit is contained in:
CUB3D 2023-02-10 00:56:54 +00:00 committed by Nathan Adams
parent 1fdd8f1a82
commit a67976f601
2 changed files with 3 additions and 3 deletions

View File

@ -576,7 +576,7 @@ impl<'a, 'gc> Activation<'a, 'gc> {
};
let b = if let Value::MovieClip(_, _) = b {
a.coerce_to_string(self)?.into()
b.coerce_to_string(self)?.into()
} else {
b
};

View File

@ -417,7 +417,7 @@ impl<'gc> Value<'gc> {
Value::MovieClip(path, mc) => {
if let Some(mc) = mc.upgrade(activation.context.gc_context) {
if !mc.read().display_object.removed()
| mc.read().display_object.pending_removal()
|| mc.read().display_object.pending_removal()
{
// Note that we can't re-use the `path` from the value above sadly, it would be quicker if we could
// But if the clip has been re-named, since being created then `mc.path() != path`