Else-If causes some issues

This commit is contained in:
Matt Nadareski
2019-09-28 01:51:06 -07:00
parent c109aceb24
commit ca0d695470
12 changed files with 71 additions and 78 deletions

View File

@@ -17,7 +17,7 @@ namespace BurnOutSharp.ProtectionType
return "SolidShield " + Utilities.GetFileVersion(file);
}
else if (fileContent.Contains("S" + (char)0x00 + "o" + (char)0x00 + "l" + (char)0x00 + "i" + (char)0x00 + "d" + (char)0x00
if (fileContent.Contains("S" + (char)0x00 + "o" + (char)0x00 + "l" + (char)0x00 + "i" + (char)0x00 + "d" + (char)0x00
+ "s" + (char)0x00 + "h" + (char)0x00 + "i" + (char)0x00 + "e" + (char)0x00 + "l" + (char)0x00 + "d" + (char)0x00
+ " " + (char)0x00 + "L" + (char)0x00 + "i" + (char)0x00 + "b" + (char)0x00 + "r" + (char)0x00 + "a" + (char)0x00
+ "r" + (char)0x00 + "y")
@@ -32,7 +32,7 @@ namespace BurnOutSharp.ProtectionType
return "SolidShield Core.dll " + Utilities.GetFileVersion(file);
}
else if ((position = fileContent.IndexOf("" + (char)0xEF + (char)0xBE + (char)0xAD + (char)0xDE)) > -1)
if ((position = fileContent.IndexOf("" + (char)0xEF + (char)0xBE + (char)0xAD + (char)0xDE)) > -1)
{
var id1 = fileContent.Substring(position + 5, 3);
var id2 = fileContent.Substring(position + 16, 4);
@@ -43,7 +43,7 @@ namespace BurnOutSharp.ProtectionType
return "SolidShield 2 (SolidShield v2 EXE Wrapper)"; // TODO: Verify against other SolidShield 2 discs
}
else if (fileContent.Contains("A" + (char)0x00 + "c" + (char)0x00 + "t" + (char)0x00 + "i" + (char)0x00 + "v" + (char)0x00
if (fileContent.Contains("A" + (char)0x00 + "c" + (char)0x00 + "t" + (char)0x00 + "i" + (char)0x00 + "v" + (char)0x00
+ "a" + (char)0x00 + "t" + (char)0x00 + "i" + (char)0x00 + "o" + (char)0x00 + "n" + (char)0x00 + " " + (char)0x00
+ "M" + (char)0x00 + "a" + (char)0x00 + "n" + (char)0x00 + "a" + (char)0x00 + "g" + (char)0x00 + "e" + (char)0x00 + "r"))
{
@@ -52,7 +52,7 @@ namespace BurnOutSharp.ProtectionType
return "SolidShield Activation Manager Module " + Utilities.GetFileVersion(file);
}
else if ((position = fileContent.IndexOf("" + (char)0xAD + (char)0xDE + (char)0xFE + (char)0xCA)) > -1)
if ((position = fileContent.IndexOf("" + (char)0xAD + (char)0xDE + (char)0xFE + (char)0xCA)) > -1)
{
if ((fileContent[position + 3] == (char)0x04 || fileContent[position + 3] == (char)0x05)
&& fileContent.Substring(position + 4, 3) == "" + (char)0x00 + (char)0x00 + (char)0x00
@@ -81,12 +81,12 @@ namespace BurnOutSharp.ProtectionType
}
}
else if ((position = fileContent.IndexOf("Solidshield")) > 0)
if ((position = fileContent.IndexOf("Solidshield")) > 0)
{
return "SolidShield " + GetVersion(file, position);
}
else if (fileContent.Contains("B" + (char)0x00 + "I" + (char)0x00 + "N" + (char)0x00 + (char)0x7 + (char)0x00 +
if (fileContent.Contains("B" + (char)0x00 + "I" + (char)0x00 + "N" + (char)0x00 + (char)0x7 + (char)0x00 +
"I" + (char)0x00 + "D" + (char)0x00 + "R" + (char)0x00 + "_" + (char)0x00 +
"S" + (char)0x00 + "G" + (char)0x00 + "T" + (char)0x0))
{