From a7f7e0e3d41a09b0825423edb535b0cf6e104d97 Mon Sep 17 00:00:00 2001 From: Yoshi Askharoun Date: Fri, 18 Jul 2025 19:57:15 -0500 Subject: [PATCH] Support exported types without base types (e.g. Class) --- libs/UIX.DecompXml/Decompiler.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libs/UIX.DecompXml/Decompiler.cs b/libs/UIX.DecompXml/Decompiler.cs index 52afa19..71da296 100644 --- a/libs/UIX.DecompXml/Decompiler.cs +++ b/libs/UIX.DecompXml/Decompiler.cs @@ -41,12 +41,15 @@ public partial class Decompiler { var name = export.Name; - var baseType = export.MarkupTypeBase; - var baseTypeName = _context.GetQualifiedName(baseType); - XElement xExport = new(_nsUix + export.MarkupType.ToString(), - new XAttribute("Name", name), - new XAttribute("Base", baseTypeName)); + new XAttribute("Name", name)); + + var baseType = export.MarkupTypeBase; + if (baseType is not null) + { + var baseTypeName = _context.GetQualifiedName(baseType); + xExport.SetAttributeValue("Base", baseTypeName); + } if (export.InitializePropertiesOffset is not uint.MaxValue) AnalyzeMethodForInit(export.InitializePropertiesOffset, xExport, export, name + "_prop");