Mandatory is technically numeric

This commit is contained in:
Matt Nadareski
2020-09-07 12:34:18 -07:00
parent 712f98fa32
commit 1494e0693f
4 changed files with 11 additions and 9 deletions

View File

@@ -276,7 +276,7 @@ namespace SabreTools.Library.DatFiles
DeviceType = reader.GetAttribute("type").AsDeviceType(),
Tag = reader.GetAttribute("tag"),
FixedImage = reader.GetAttribute("fixed_image"),
Mandatory = reader.GetAttribute("mandatory"),
Mandatory = Sanitizer.CleanLong(reader.GetAttribute("mandatory")),
Interface = reader.GetAttribute("interface"),
Source = new Source
@@ -1421,7 +1421,7 @@ namespace SabreTools.Library.DatFiles
xtw.WriteOptionalAttributeString("type", device.DeviceType.FromDeviceType());
xtw.WriteOptionalAttributeString("tag", device.Tag);
xtw.WriteOptionalAttributeString("fixed_image", device.FixedImage);
xtw.WriteOptionalAttributeString("mandatory", device.Mandatory);
xtw.WriteOptionalAttributeString("mandatory", device.Mandatory?.ToString());
xtw.WriteOptionalAttributeString("interface", device.Interface);
if (device.Instances != null)
{