From 3537befde69792750e882dcf6386e7262b243cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 27 Nov 2022 17:10:37 +0100 Subject: [PATCH] Fixed AS3 - XML - get descendants operator parenthesis --- CHANGELOG.md | 3 ++- .../flash/abc/avm2/model/GetDescendantsAVM2Item.java | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce0718e79..3398e7a6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,8 @@ All notable changes to this project will be documented in this file. - [#1892] AS3 - Package internal custom namespaces - Unpin all context menu not clearing pins properly - AS3 - RegExp escaping -- Avoid Error Implicit coercion of a value of type XXX to an unrelated type YYY +- AS3 - Avoid Error Implicit coercion of a value of type XXX to an unrelated type YYY +- AS3 - XML - get descendants operator parenthesis ## [17.0.2] - 2022-11-22 ### Fixed diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java index 69b88d505..8f042746e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java @@ -65,7 +65,14 @@ public class GetDescendantsAVM2Item extends AVM2Item { @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - object.toString(writer, localData); + if (object.getPrecedence() > precedence) { + writer.append("("); + object.toString(writer, localData); + writer.append(")"); + } else { + object.toString(writer, localData); + } + writer.append(".."); return multiname.toString(writer, localData); }