From 3ed2bdd5a64de657cf18ffb4788153c6bb789b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 23 May 2026 17:04:51 +0200 Subject: [PATCH] fix(as3 direct edit): correct protected property access on toplevel (#2713) Fixes #2713 --- .../flash/abc/avm2/parser/script/PropertyAVM2Item.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 e490dc250..baa384a83 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 @@ -342,8 +342,10 @@ public class PropertyAVM2Item extends AssignableAVM2Item { boolean found = false; String nsName = ns.getName(propValueAbc.constants).toRawString(); while (ci != null) { - DottedChain clsName = ci.abc.instance_info.get(ci.index).getName(ci.abc.constants).getNameWithNamespace(new HashSet<>(), ci.abc, ci.abc.constants, false); - String clsNsName = clsName.isTopLevel() ? clsName.getLast() : clsName.getWithoutLast().toRawString() + ":" + clsName.getLast(); + DottedChain clsFullName = ci.abc.instance_info.get(ci.index).getName(ci.abc.constants).getNameWithNamespace(new HashSet<>(), ci.abc, ci.abc.constants, false); + DottedChain clsPkg = clsFullName.getWithoutLast(); + String clsName = clsFullName.getLast(); + String clsNsName = clsPkg.isTopLevel() ? clsName : clsPkg.toRawString() + ":" + clsName; if (Objects.equals(nsName, clsNsName)) { found = true; break;