mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix logic errors
This commit is contained in:
@@ -256,15 +256,15 @@ namespace SabreTools
|
|||||||
// Filter on game name
|
// Filter on game name
|
||||||
if (_gamename != "")
|
if (_gamename != "")
|
||||||
{
|
{
|
||||||
if (!(_gamename.StartsWith("*") && _gamename.EndsWith("*") && rom.Game.Contains(_gamename.Replace("*", ""))))
|
if (_gamename.StartsWith("*") && _gamename.EndsWith("*") && !rom.Game.ToLowerInvariant().Contains(_gamename.ToLowerInvariant().Replace("*", "")))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!(_gamename.StartsWith("*") && rom.Game.EndsWith(_gamename.Replace("*", ""))))
|
else if (_gamename.StartsWith("*") && !rom.Game.EndsWith(_gamename.Replace("*", ""), StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!(_gamename.EndsWith("*") && rom.Game.StartsWith(_gamename.Replace("*", ""))))
|
else if (_gamename.EndsWith("*") && !rom.Game.StartsWith(_gamename.Replace("*", ""), StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -273,22 +273,22 @@ namespace SabreTools
|
|||||||
// Filter on rom name
|
// Filter on rom name
|
||||||
if (_romname != "")
|
if (_romname != "")
|
||||||
{
|
{
|
||||||
if (!(_romname.StartsWith("*") && _romname.EndsWith("*") && rom.Name.Contains(_romname.Replace("*", ""))))
|
if (_romname.StartsWith("*") && _romname.EndsWith("*") && !rom.Name.ToLowerInvariant().Contains(_romname.ToLowerInvariant().Replace("*", "")))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!(_romname.StartsWith("*") && rom.Name.EndsWith(_romname.Replace("*", ""))))
|
else if (_romname.StartsWith("*") && !rom.Name.EndsWith(_romname.Replace("*", ""), StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!(_romname.EndsWith("*") && rom.Name.StartsWith(_romname.Replace("*", ""))))
|
else if (_romname.EndsWith("*") && !rom.Name.StartsWith(_romname.Replace("*", ""), StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter on rom type
|
// Filter on rom type
|
||||||
if (_romtype != "" && rom.Type != _romtype)
|
if (_romtype != "" && rom.Type.ToLowerInvariant() != _romtype.ToLowerInvariant())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -313,15 +313,15 @@ namespace SabreTools
|
|||||||
// Filter on crc
|
// Filter on crc
|
||||||
if (_crc != "")
|
if (_crc != "")
|
||||||
{
|
{
|
||||||
if (!(_crc.StartsWith("*") && _crc.EndsWith("*") && rom.CRC.Contains(_crc.Replace("*", ""))))
|
if (_crc.StartsWith("*") && _crc.EndsWith("*") && !rom.CRC.ToLowerInvariant().Contains(_crc.ToLowerInvariant().Replace("*", "")))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!(_crc.StartsWith("*") && rom.CRC.EndsWith(_crc.Replace("*", ""))))
|
else if (_crc.StartsWith("*") && !rom.CRC.EndsWith(_crc.Replace("*", ""), StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!(_crc.EndsWith("*") && rom.CRC.StartsWith(_crc.Replace("*", ""))))
|
else if (_crc.EndsWith("*") && !rom.CRC.StartsWith(_crc.Replace("*", ""), StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -330,15 +330,15 @@ namespace SabreTools
|
|||||||
// Filter on md5
|
// Filter on md5
|
||||||
if (_md5 != "")
|
if (_md5 != "")
|
||||||
{
|
{
|
||||||
if (!(_md5.StartsWith("*") && _md5.EndsWith("*") && rom.MD5.Contains(_md5.Replace("*", ""))))
|
if (_md5.StartsWith("*") && _md5.EndsWith("*") && !rom.MD5.ToLowerInvariant().Contains(_md5.ToLowerInvariant().Replace("*", "")))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!(_md5.StartsWith("*") && rom.MD5.EndsWith(_md5.Replace("*", ""))))
|
else if (_md5.StartsWith("*") && !rom.MD5.EndsWith(_md5.Replace("*", ""), StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!(_md5.EndsWith("*") && rom.MD5.StartsWith(_md5.Replace("*", ""))))
|
else if (_md5.EndsWith("*") && !rom.MD5.StartsWith(_md5.Replace("*", ""), StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -347,15 +347,15 @@ namespace SabreTools
|
|||||||
// Filter on sha1
|
// Filter on sha1
|
||||||
if (_sha1 != "")
|
if (_sha1 != "")
|
||||||
{
|
{
|
||||||
if (!(_sha1.StartsWith("*") && _sha1.EndsWith("*") && rom.SHA1.Contains(_sha1.Replace("*", ""))))
|
if (_sha1.StartsWith("*") && _sha1.EndsWith("*") && !rom.SHA1.ToLowerInvariant().Contains(_sha1.ToLowerInvariant().Replace("*", "")))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!(_sha1.StartsWith("*") && rom.SHA1.EndsWith(_sha1.Replace("*", ""))))
|
else if (_sha1.StartsWith("*") && !rom.SHA1.EndsWith(_sha1.Replace("*", ""), StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!(_sha1.EndsWith("*") && rom.SHA1.StartsWith(_sha1.Replace("*", ""))))
|
else if (_sha1.EndsWith("*") && !rom.SHA1.StartsWith(_sha1.Replace("*", ""), StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user