Allow for blank overrides of header values

This commit is contained in:
Matt Nadareski
2020-08-08 14:06:05 -07:00
parent f27f57855d
commit ff8aebd3f0
13 changed files with 113 additions and 111 deletions

View File

@@ -62,8 +62,8 @@ namespace SabreTools.Library.DatFiles
switch (xtr.Name)
{
case "softwarelist":
Header.Name = (string.IsNullOrWhiteSpace(Header.Name) ? xtr.GetAttribute("name") ?? string.Empty : Header.Name);
Header.Description = (string.IsNullOrWhiteSpace(Header.Description) ? xtr.GetAttribute("description") ?? string.Empty : Header.Description);
Header.Name = (Header.Name == null ? xtr.GetAttribute("name") ?? string.Empty : Header.Name);
Header.Description = (Header.Description == null ? xtr.GetAttribute("description") ?? string.Empty : Header.Description);
if (Header.ForceMerging == ForceMerging.None)
Header.ForceMerging = xtr.GetAttribute("forcemerging").AsForceMerging();