Fix JSON read/write, XML write

This commit is contained in:
Matt Nadareski
2020-08-24 11:56:49 -07:00
parent a424f53407
commit d8fdce88c0
26 changed files with 348 additions and 2064 deletions

View File

@@ -445,7 +445,7 @@ namespace SabreTools.Library.DatFiles
// Otherwise, write out the SHA-1 hash
else if (!string.IsNullOrWhiteSpace(disk.SHA1))
sw.Write($" SHA1({disk.SHA1})");
sw.Write($" SHA1({disk.SHA1 ?? string.Empty})");
// If we have a baddump, put the second indicator
if (disk.ItemStatus == ItemStatus.BadDump)
@@ -480,9 +480,9 @@ namespace SabreTools.Library.DatFiles
else
{
if (!string.IsNullOrWhiteSpace(rom.CRC))
sw.Write($" CRC({rom.CRC})");
sw.Write($" CRC({rom.CRC ?? string.Empty})");
if (!string.IsNullOrWhiteSpace(rom.SHA1))
sw.Write($" SHA1({rom.SHA1})");
sw.Write($" SHA1({rom.SHA1 ?? string.Empty})");
}
// If we have a baddump, put the second indicator