diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cd09f367..841a3a998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ All notable changes to this project will be documented in this file. - [#2004] Freezing when a shape has nonimage character set as fill - [#2004] Nonrepeating fill border - [#2008] AS3 P-code editing optional Double value when it has no fractional part -- Zero line number on AS3 P-code editation error +- AS3 P-code editation - zero line number on error +- [#2007] AS3 renaming invalid identifiers - not refreshing AbcIndex afterwards ## [18.4.1] - 2023-04-05 ### Fixed @@ -3035,6 +3036,7 @@ All notable changes to this project will be documented in this file. [#1998]: https://www.free-decompiler.com/flash/issues/1998 [#2004]: https://www.free-decompiler.com/flash/issues/2004 [#2008]: https://www.free-decompiler.com/flash/issues/2008 +[#2007]: https://www.free-decompiler.com/flash/issues/2007 [#1993]: https://www.free-decompiler.com/flash/issues/1993 [#1994]: https://www.free-decompiler.com/flash/issues/1994 [#1477]: https://www.free-decompiler.com/flash/issues/1477 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java index ccf3c397a..285a7197c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -477,7 +477,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { } } } - abcIndex.rebuildPkgToObjectsNameMap(); + abcIndex.rebuildPkgToObjectsNameMap(); numAbcIndexDependencies = swfs.size(); } @@ -2712,7 +2712,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { } public int deobfuscateAS3Identifiers(RenameType renameType) { - + AbcIndexing ai = getAbcIndex(); Map> stringUsageTypesMap = new HashMap<>(); Map> stringUsagesMap = new HashMap<>(); informListeners("deobfuscate", "Getting usages..."); @@ -2754,7 +2754,13 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { sc.setModified(true); } } - deobfuscation.deobfuscateInstanceNames(true, deobfuscated, renameType, getTags(), new HashMap<>()); + deobfuscation.deobfuscateInstanceNames(true, deobfuscated, renameType, getTags(), new HashMap<>()); + + for (Tag tag : getTags()) { + if (tag instanceof ABCContainerTag) { + ai.refreshAbc(((ABCContainerTag)tag).getABC()); + } + } return deobfuscated.size(); }