From 2b7434d488857fd75eab0e9fd99d042330b7d403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Fri, 18 Nov 2022 17:43:04 +0100 Subject: [PATCH] Fixed #1840 AS3 Direct editation - Type mismatched for a trait --- CHANGELOG.md | 1 + .../flash/abc/avm2/parser/script/PropertyAVM2Item.java | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2880eb459..64521e6b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file. - [#1875] Garbage collect SWF and its caches after closing it - [#1807] Proper parenthesis around call inside another call - [#1840] AS3 - Allow to compile object literal keys with nonstring/numbers in obfuscated code +- [#1840] AS3 Direct editation - Type mismatched for a trait ### Changed - GFX - DefineExternalImage2 no longer handled as character diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java index 530453361..4924e6c30 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java @@ -272,7 +272,7 @@ public class PropertyAVM2Item extends AssignableAVM2Item { int nsKind = openedNamespaces.get(i).kind; DottedChain nsname = openedNamespaces.get(i).name; - int name_index = 0; + int name_index = 0; int string_property_index = constants.getStringId(propertyName, false); if (string_property_index > -1) { for (int m = 1; m < constants.getMultinameCount(); m++) { @@ -286,7 +286,8 @@ public class PropertyAVM2Item extends AssignableAVM2Item { } } if (name_index > 0) { - for (int c = 0; c < abc.instance_info.size(); c++) { + //I believe these can be commented out... as it breaks #1840 + /*for (int c = 0; c < abc.instance_info.size(); c++) { if (abc.instance_info.get(c).deleted) { continue; } @@ -316,8 +317,7 @@ public class PropertyAVM2Item extends AssignableAVM2Item { break loopobjType; } } - } - + }*/ for (ScriptInfo si : abc.script_info) { if (si.deleted) {