[DatFile, Disk, Rom] Make sure nulls are accounted for

This commit is contained in:
Matt Nadareski
2016-09-19 20:51:18 -07:00
parent 10b74ec550
commit 44b00f9f5a
3 changed files with 16 additions and 17 deletions

View File

@@ -1866,16 +1866,15 @@ namespace SabreTools.Helper
switch (subreader.Name.ToLowerInvariant())
{
case "disk":
inrom = new Disk(subreader.GetAttribute("name"), subreader.GetAttribute("md5")?.ToLowerInvariant(),
subreader.GetAttribute("sha1")?.ToLowerInvariant(), isnodump, tempname, null, gamedesc, null, null,
romof, cloneof, sampleof, null, false, null, null, sysid, filename, srcid, null);
inrom = new Disk(subreader.GetAttribute("name"), subreader.GetAttribute("md5"), subreader.GetAttribute("sha1"),
isnodump, tempname, null, gamedesc, null, null, romof, cloneof, sampleof, null, false, null, null, sysid,
filename, srcid, null);
break;
case "rom":
default:
inrom = new Rom(subreader.GetAttribute("name"), size, subreader.GetAttribute("crc")?.ToLowerInvariant(),
subreader.GetAttribute("md5")?.ToLowerInvariant(), subreader.GetAttribute("sha1")?.ToLowerInvariant(), isnodump,
date, tempname, null, gamedesc, null, null, romof, cloneof, sampleof, null, false, null, null, sysid, filename,
srcid, null);
inrom = new Rom(subreader.GetAttribute("name"), size, subreader.GetAttribute("crc"), subreader.GetAttribute("md5"),
subreader.GetAttribute("sha1"), isnodump, date, tempname, null, gamedesc, null, null, romof, cloneof, sampleof,
null, false, null, null, sysid, filename, srcid, null);
break;
}