Name attributes on dictionary entries should always be first

This commit is contained in:
Yoshi Askharoun
2025-09-21 21:25:29 -05:00
parent 983474c5f1
commit 2587985a9b
+7 -1
View File
@@ -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;
}