diff --git a/CHANGELOG.md b/CHANGELOG.md index ce20235c2..c09923e1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file. - [#2070] Handling newlines and tabs in string values inside SWF to XML export - [#2017], PR179 Classes in same package displayed as fully qualified - PR177 AS3 direct editation - Vector literal +- [#2052] Adding new script placing class to incorrect DoABC tag ### Changed - [#2070] String values inside SWF to XML export are backslash escaped @@ -3064,6 +3065,7 @@ Major version of SWF to XML export changed to 2. [#1449]: https://www.free-decompiler.com/flash/issues/1449 [#2070]: https://www.free-decompiler.com/flash/issues/2070 [#2017]: https://www.free-decompiler.com/flash/issues/2017 +[#2052]: https://www.free-decompiler.com/flash/issues/2052 [#2043]: https://www.free-decompiler.com/flash/issues/2043 [#1998]: https://www.free-decompiler.com/flash/issues/1998 [#2038]: https://www.free-decompiler.com/flash/issues/2038 diff --git a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java index 1a4abd368..ca95797dd 100644 --- a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.TagRemoveListener; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.ScriptPack; import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AbcIndexing; import com.jpexs.decompiler.flash.abc.avm2.parser.script.ActionScript3Parser; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.parser.ActionParseException; @@ -1934,7 +1935,9 @@ public class TagTreeContextMenu extends JPopupMenu { } } try { - ActionScript3Parser parser = new ActionScript3Parser(swf.getAbcIndex()); + AbcIndexing abcIndex = swf.getAbcIndex(); + abcIndex.selectAbc(doAbc.getABC()); + ActionScript3Parser parser = new ActionScript3Parser(abcIndex); DottedChain dc = new DottedChain(pkgParts); String script = "package " + dc.toPrintableString(true) + " {"