From e17c8c202ec2ee2a3b2eb83794f1d04f7e7b3814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Tue, 28 Feb 2023 21:43:38 +0100 Subject: [PATCH] Fixed AS3 Metadata in P-code formatting --- CHANGELOG.md | 1 + .../com/jpexs/decompiler/flash/abc/types/traits/Trait.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2219de761..241a4a226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. - AS3 direct editation - Allow comma operator in switch expressions - AS3 XML embedded variables display and direct edit - AS3 Metadata values order +- AS3 Metadata in P-code formatting ## [18.3.6] - 2023-02-25 ### Fixed diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java index d081b0006..a93ef84b3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java @@ -417,9 +417,9 @@ public abstract class Trait implements Cloneable, Serializable { writer.hilightSpecial("0x8", HighlightSpecialType.ATTR_0x8); } if ((kindFlags & ATTR_Metadata) > 0) { - writer.newLine(); for (int m : metadata) { - writer.append("metadata"); + writer.newLine(); + writer.append("metadata "); writer.append("\""); writer.append(Helper.escapePCodeString(abc.constants.getString(abc.metadata_info.get(m).name_index))); writer.append("\"");