diff --git a/CHANGELOG.md b/CHANGELOG.md index cfc264134..4b7fd688e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ All notable changes to this project will be documented in this file. - [#2507] FLA export - Button hit test frame placing morphshapes - [#2507] FLA export - Place characters over multiple button frames - [#2508] AS1/2 direct editation - first command in for loop header not compiled +- [#2510] AS direct editation - popped value ### Changed - Icon of "Deobfuscation options" menu from pile of pills to medkit @@ -3971,6 +3972,7 @@ Major version of SWF to XML export changed to 2. [#2503]: https://www.free-decompiler.com/flash/issues/2503 [#2507]: https://www.free-decompiler.com/flash/issues/2507 [#2508]: https://www.free-decompiler.com/flash/issues/2508 +[#2510]: https://www.free-decompiler.com/flash/issues/2510 [#2476]: https://www.free-decompiler.com/flash/issues/2476 [#2404]: https://www.free-decompiler.com/flash/issues/2404 [#1418]: https://www.free-decompiler.com/flash/issues/1418 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java index 822a36480..6f0c68fde 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java @@ -278,8 +278,8 @@ public class AVM2SourceGenerator implements SourceGenerator { } @Override - public List generateDiscardValue(SourceGeneratorLocalData localData, GraphTargetItem item) throws CompilationException { - List ret = item.toSource(localData, this); + public List generateDiscardValue(SourceGeneratorLocalData localData, GraphTargetItem item) throws CompilationException { + List ret = new ArrayList<>(item.toSource(localData, this)); ret.add(ins(AVM2Instructions.Pop)); return ret; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java index 75a13f982..02b9c9722 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java @@ -526,7 +526,7 @@ public class ActionSourceGenerator implements SourceGenerator { @Override public List generateDiscardValue(SourceGeneratorLocalData localData, GraphTargetItem item) throws CompilationException { - List ret = item.toSource(localData, this); + List ret = new ArrayList<>(item.toSource(localData, this)); ret.add(new ActionPop()); return ret; }