Skip to content

Commit 1cef42a

Browse files
authored
Account for net20
1 parent 67e5401 commit 1cef42a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

MPF.Processors/ProcessingTool.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,16 @@ public static bool IsValidSS(byte[] ss)
10971097
return false;
10981098

10991099
// Drive entry table must be duplicated exactly
1100-
if (!ss.Skip(0x661).Take(0x730 - 0x661).SequenceEqual(ss.Skip(0x730).Take(0x7FF - 0x730)))
1100+
1101+
#if NET20
1102+
var table1 = new byte[207];
1103+
Array.Copy(ss, 0x661, table1, 0, 207);
1104+
var table2 = new byte[207];
1105+
Array.Copy(ss, 0x730, table2, 0, 207);
1106+
if (Array.Exists(Enumerable.Range(0, a.Length).ToArray(), i => table1[i] != table2[i]))
1107+
#else
1108+
if (!ss.AsSpan(0x661, 0x730 - 0x661).SequenceEqual(ss.AsSpan(0x730, 0x7FF - 0x730)))
1109+
#endif
11011110
return false;
11021111

11031112
// Remaining checks are only for Xbox360 SS

0 commit comments

Comments
 (0)