Fixes for rare texture loading issues

And an attempt to try prevent rare reported issues with prepatch loading
This commit is contained in:
bbradson
2023-06-13 19:43:02 +02:00
parent 76c0f7a371
commit 3d8c8e4d29
5 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -185,5 +185,5 @@ public static class DDSLoader
}
private static bool FourCcEquals(IList<byte> bytes, string s)
=> bytes[0] == s[0] && bytes[1] == s[1] && bytes[2] == s[2] && bytes[3] == s[3];
=> bytes.Count >= 4 && bytes[0] == s[0] && bytes[1] == s[1] && bytes[2] == s[2] && bytes[3] == s[3];
}