From db2a6f63ff00df5c4e0dbaa52444cdb1e013cfe4 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 18 Sep 2026 10:44:56 -0400 Subject: [PATCH] Allow sizeless ROMs if there's a SHA-1 or SHA-256 --- SabreTools.Metadata.DatFiles/DatFile.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SabreTools.Metadata.DatFiles/DatFile.cs b/SabreTools.Metadata.DatFiles/DatFile.cs index 541cc66e..ed3cb5e8 100644 --- a/SabreTools.Metadata.DatFiles/DatFile.cs +++ b/SabreTools.Metadata.DatFiles/DatFile.cs @@ -684,6 +684,14 @@ namespace SabreTools.Metadata.DatFiles if (rom.CRC32 != "null") return rom; + // If the item has a SHA-1 but no size + if (rom.Size is null && rom.SHA1 is not null) + return rom; + + // If the item has a SHA-256 but no size + if (rom.Size is null && rom.SHA256 is not null) + return rom; + // If the Rom has "null" characteristics, ensure all fields rom.Name = rom.Name == "null" ? "-" : rom.Name; rom.Size = 0;