From e5007f23d07628d0720b687eb9d06b21de4aeb63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Mon, 30 Sep 2024 19:58:36 +0200 Subject: [PATCH] Fixed: #2334 AS1/2 P-code export - Do not export on(xxx) header --- CHANGELOG.md | 2 ++ libsrc/ffdec_cli/nbproject/project.xml | 2 +- .../flash/exporters/script/ExportScriptTask.java | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d9fc7d47..b779bf5f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file. - [#2332] Imported fonts by class name not available in texts - [#2330] Windows EXE launcher (+ CLI) does not respect current working directory - [#2335] AS3 direct editation - Type coercion of `&&` and `||` operators +- [#2334] AS1/2 P-code export - Do not export on(xxx) header ## [21.1.0] - 2024-09-23 ### Added @@ -3611,6 +3612,7 @@ Major version of SWF to XML export changed to 2. [#2332]: https://www.free-decompiler.com/flash/issues/2332 [#2330]: https://www.free-decompiler.com/flash/issues/2330 [#2335]: https://www.free-decompiler.com/flash/issues/2335 +[#2334]: https://www.free-decompiler.com/flash/issues/2334 [#943]: https://www.free-decompiler.com/flash/issues/943 [#1812]: https://www.free-decompiler.com/flash/issues/1812 [#2287]: https://www.free-decompiler.com/flash/issues/2287 diff --git a/libsrc/ffdec_cli/nbproject/project.xml b/libsrc/ffdec_cli/nbproject/project.xml index bf9215df6..06a1e2553 100644 --- a/libsrc/ffdec_cli/nbproject/project.xml +++ b/libsrc/ffdec_cli/nbproject/project.xml @@ -68,7 +68,7 @@ auxiliary.show.customizer.message= src - ../../dist/ffdec.jar + ../../src build/classes 1.8 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/ExportScriptTask.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/ExportScriptTask.java index d417f6536..92019cb81 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/ExportScriptTask.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/ExportScriptTask.java @@ -113,10 +113,10 @@ public class ExportScriptTask implements Callable { asm.getActionSourceSuffix(writer2); } else if (exportMode == ScriptExportMode.PCODE_GRAPHVIZ) { new PcodeGraphVizExporter().exportAs12(asm, writer2); - } else if (exportMode != ScriptExportMode.AS) { - asm.getActionSourcePrefix(writer2); - asm.getASMSource(exportMode, writer2, null); - asm.getActionSourceSuffix(writer2); + } else if (exportMode != ScriptExportMode.AS) { + //asm.getActionSourcePrefix(writer2); + asm.getASMSource(exportMode, writer2, null); + //asm.getActionSourceSuffix(writer2); } else { ActionList as; try (Statistics s = new Statistics("ASMSource.getActions")) { @@ -126,8 +126,8 @@ public class ExportScriptTask implements Callable { Action.setActionsAddresses(as, 0); try (Statistics s = new Statistics("Action.actionsToSource")) { - asm.getActionScriptSource(writer2, as); - } + asm.getActionScriptSource(writer2, as); + } } }