From 2587985a9be4b762b3ca58a138e2a7ae963f51cb Mon Sep 17 00:00:00 2001 From: Yoshi Askharoun Date: Thu, 14 Aug 2025 02:31:10 -0500 Subject: [PATCH] Name attributes on dictionary entries should always be first --- libs/UIX.DecompXml/Decompiler.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/UIX.DecompXml/Decompiler.cs b/libs/UIX.DecompXml/Decompiler.cs index 744705c..d33d25a 100644 --- a/libs/UIX.DecompXml/Decompiler.cs +++ b/libs/UIX.DecompXml/Decompiler.cs @@ -448,7 +448,13 @@ public partial class Decompiler private XElement PropertyDictionaryAddOnXElement(XElement xDictionary, IrisObject value, string key) { var xDictionaryEntry = PropertyListAddOnXElement(xDictionary, value); - xDictionaryEntry.SetAttributeValue("Name", key); + + // Insert the Name attribute (make sure it's always first) + var attributes = xDictionaryEntry.Attributes().ToArray(); + xDictionaryEntry.RemoveAttributes(); + xDictionaryEntry.Add(new XAttribute("Name", key)); + xDictionaryEntry.Add(attributes); + return xDictionaryEntry; }