diff --git a/CHANGELOG.md b/CHANGELOG.md index a365abdd5..278afd254 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. - [#1769] AS3 - Missing some body trait variable declaration - [#1769], [#1888] AS3 - Missing casts like int() - [#1890] AS3 - Chained assignments in some special cases +- [#1810] AS3 Direct editation - XML attribute handling ## [17.0.2] - 2022-11-22 ### Fixed @@ -2653,6 +2654,7 @@ All notable changes to this project will be documented in this file. [#1769]: https://www.free-decompiler.com/flash/issues/1769 [#1888]: https://www.free-decompiler.com/flash/issues/1888 [#1890]: https://www.free-decompiler.com/flash/issues/1890 +[#1810]: https://www.free-decompiler.com/flash/issues/1810 [#1882]: https://www.free-decompiler.com/flash/issues/1882 [#1880]: https://www.free-decompiler.com/flash/issues/1880 [#1881]: https://www.free-decompiler.com/flash/issues/1881 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java index 4924e6c30..aa357c28d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java @@ -379,9 +379,6 @@ public class PropertyAVM2Item extends AssignableAVM2Item { if (propIndex == 0 && !mustExist) { String pname = propertyName; - if (attribute) { - pname = pname.substring(1); - } Multiname multiname; if (attribute && pname.isEmpty()) { multiname = Multiname.createMultinameL(true, diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/DottedChain.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/DottedChain.java index d9c206711..fadcaed60 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/DottedChain.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/DottedChain.java @@ -268,7 +268,7 @@ public class DottedChain implements Serializable, Comparable { nattributes[nattributes.length - 1] = attribute; nparts[nparts.length - 1] = name; nnamespaceSuffixes[nparts.length - 1] = namespaceSuffix; - return new DottedChain(nparts, nnamespaceSuffixes); + return new DottedChain(nattributes, nparts, nnamespaceSuffixes); } protected String toString(boolean as3, boolean raw, boolean withSuffix) { @@ -284,7 +284,9 @@ public class DottedChain implements Serializable, Comparable { if (i > 0) { ret.append("."); } - + if (attributes[i]) { + ret.append("@"); + } String part = parts[i]; boolean lastStar = i == length - 1 && "*".equals(part); ret.append((raw || lastStar) ? part : IdentifiersDeobfuscation.printIdentifier(as3, part));