mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile, Disk, Rom] Make sure nulls are accounted for
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ namespace SabreTools.Helper
|
||||
{
|
||||
_name = name;
|
||||
_itemType = ItemType.Disk;
|
||||
_md5 = md5.ToLowerInvariant();
|
||||
_sha1 = sha1.ToLowerInvariant();
|
||||
_md5 = md5?.ToLowerInvariant();
|
||||
_sha1 = sha1?.ToLowerInvariant();
|
||||
_nodump = nodump;
|
||||
}
|
||||
|
||||
@@ -94,8 +94,8 @@ namespace SabreTools.Helper
|
||||
{
|
||||
_name = name;
|
||||
_itemType = ItemType.Disk;
|
||||
_md5 = md5.ToLowerInvariant();
|
||||
_sha1 = sha1.ToLowerInvariant();
|
||||
_md5 = md5?.ToLowerInvariant();
|
||||
_sha1 = sha1?.ToLowerInvariant();
|
||||
_nodump = nodump;
|
||||
_machineName = machineName;
|
||||
_comment = comment;
|
||||
|
||||
@@ -73,9 +73,9 @@ namespace SabreTools.Helper
|
||||
_name = name;
|
||||
_itemType = ItemType.Rom;
|
||||
_size = size;
|
||||
_crc = crc.ToLowerInvariant();
|
||||
_md5 = md5.ToLowerInvariant();
|
||||
_sha1 = sha1.ToLowerInvariant();
|
||||
_crc = crc?.ToLowerInvariant();
|
||||
_md5 = md5?.ToLowerInvariant();
|
||||
_sha1 = sha1?.ToLowerInvariant();
|
||||
_nodump = nodump;
|
||||
_date = date;
|
||||
}
|
||||
@@ -113,9 +113,9 @@ namespace SabreTools.Helper
|
||||
_name = name;
|
||||
_itemType = ItemType.Rom;
|
||||
_size = size;
|
||||
_crc = crc.ToLowerInvariant();
|
||||
_md5 = md5.ToLowerInvariant();
|
||||
_sha1 = sha1.ToLowerInvariant();
|
||||
_crc = crc?.ToLowerInvariant();
|
||||
_md5 = md5?.ToLowerInvariant();
|
||||
_sha1 = sha1?.ToLowerInvariant();
|
||||
_nodump = nodump;
|
||||
_date = date;
|
||||
_machineName = machineName;
|
||||
|
||||
Reference in New Issue
Block a user