Flash: Custom ROM: Fix incorrect unlocked check for EFIESP

This commit is contained in:
Gustave Monce
2021-08-16 11:40:58 +02:00
parent 846ea41883
commit 1d14d79fab
@@ -2067,7 +2067,7 @@ namespace WPinternals
ulong EfiespLength = StreamLengthInSectors * 0x200;
byte[] EfiespBinary = new byte[EfiespLength];
DecompressedStream.Read(EfiespBinary, 0, (int)EfiespLength);
IsUnlocked = (ByteOperations.ReadUInt32(EfiespBinary, 0x20) == (EfiespBinary.Length / 0x200 / 2)) && ByteOperations.ReadAsciiString(EfiespBinary, (UInt32)(EfiespBinary.Length / 2) + 3, 8) == "MSDOS5.0";
IsUnlocked = (ByteOperations.ReadUInt32(EfiespBinary, 0x20) == (EfiespBinary.Length / 0x200 / 2)) || ByteOperations.ReadAsciiString(EfiespBinary, (UInt32)(EfiespBinary.Length / 2) + 3, 8) == "MSDOS5.0";
if (IsUnlocked)
{
Partition IsUnlockedFlag = GPT.GetPartition("IS_UNLOCKED");