Trim names in hashfiles

This commit is contained in:
Matt Nadareski
2023-03-30 19:35:41 -04:00
parent aa5cc76f8f
commit 9d1dc11c6a

View File

@@ -50,13 +50,13 @@ namespace SabreTools.DatFiles.Formats
// If we have CRC, then it's an SFV file and the name is first
if (_hash.HasFlag(Hash.CRC))
{
name = string.Join(" ", split[..^1]).Replace("*", String.Empty);
name = string.Join(" ", split[..^1]).Replace("*", String.Empty).Trim();
hash = split[^1];
}
// Otherwise, the name is second
else
{
name = string.Join(" ", split[1..]).Replace("*", String.Empty);
name = string.Join(" ", split[1..]).Replace("*", String.Empty).Trim();
hash = split[0];
}