From 24151d2945b453ad3cdaff95007f095d6ae20e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Fri, 29 Aug 2025 18:02:52 +0200 Subject: [PATCH] Fixed: #2525 AMF editor - saving empty standard array [] --- CHANGELOG.md | 2 ++ .../decompiler/flash/importers/amf/amf0/Amf0Importer.java | 3 +-- .../decompiler/flash/importers/amf/amf3/Amf3Importer.java | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 140602236..f3f1a7ddc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,6 +89,7 @@ All notable changes to this project will be documented in this file. - [#2522] Hex view - reseting view when mouse over panel bottom - [#2519] AS1/2 direct editation - generating too large ConstantPool - Hex View - incorrect table height when switching tags +- [#2525] AMF editor (like in Sol cookie editor) - saving empty standard array `[]` ### Changed - Icon of "Deobfuscation options" menu from pile of pills to medkit @@ -4005,6 +4006,7 @@ Major version of SWF to XML export changed to 2. [#2516]: https://www.free-decompiler.com/flash/issues/2516 [#2517]: https://www.free-decompiler.com/flash/issues/2517 [#2522]: https://www.free-decompiler.com/flash/issues/2522 +[#2525]: https://www.free-decompiler.com/flash/issues/2525 [#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/importers/amf/amf0/Amf0Importer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf0/Amf0Importer.java index 216c29b5c..b6a7e8e8f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf0/Amf0Importer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf0/Amf0Importer.java @@ -101,9 +101,8 @@ public class Amf0Importer { arrayVals.add(value(objectTable)); s = lex(); } - pushback(s); } - expectedType(SymbolType.BRACKET_CLOSE); + expectedType(s, lexer.yyline(), SymbolType.BRACKET_CLOSE); return new JsArray(arrayVals); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf3/Amf3Importer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf3/Amf3Importer.java index 16eefc14f..835935de1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf3/Amf3Importer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf3/Amf3Importer.java @@ -109,9 +109,8 @@ public class Amf3Importer { arrayVals.add(value(objectTable)); s = lex(); } - pushback(s); } - expectedType(SymbolType.BRACKET_CLOSE); + expected(s, lexer.yyline(), SymbolType.BRACKET_CLOSE); return new JsArray(arrayVals); }