Support ancient .NET in Core

This commit is contained in:
Matt Nadareski
2024-02-28 19:49:09 -05:00
parent 823a9ca7b7
commit 778399cad7
11 changed files with 269 additions and 184 deletions

View File

@@ -32,7 +32,7 @@ namespace SabreTools.Core.Tools
public static bool ConditionalHashEquals(string? firstHash, string? secondHash)
{
// If either hash is empty, we say they're equal for merging
if (string.IsNullOrWhiteSpace(firstHash) || string.IsNullOrWhiteSpace(secondHash))
if (string.IsNullOrEmpty(firstHash) || string.IsNullOrEmpty(secondHash))
return true;
// If they're different sizes, they can't match
@@ -56,7 +56,7 @@ namespace SabreTools.Core.Tools
return null;
// If the hash isn't the right size, then we return null
if (hash.Length != Constants.SHA1Length)
if (hash!.Length != Constants.SHA1Length)
return null;
// Cap the depth between 0 and 20, for now