mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(CxEncryption.Init): control block expected to be on a dword boundary.
This commit is contained in:
@@ -110,7 +110,7 @@ namespace GameRes.Formats.KiriKiri
|
|||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
byte* begin = view.GetPointer (0);
|
byte* begin = view.GetPointer (0);
|
||||||
byte* end = begin + (((uint)tpm.MaxOffset - 0x1000u) & ~0xFu);
|
byte* end = begin + (((uint)tpm.MaxOffset - 0x1000u) & ~0x3u);
|
||||||
try {
|
try {
|
||||||
while (begin < end)
|
while (begin < end)
|
||||||
{
|
{
|
||||||
@@ -128,7 +128,7 @@ namespace GameRes.Formats.KiriKiri
|
|||||||
ControlBlock[i] = ~src[i];
|
ControlBlock[i] = ~src[i];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
begin += 0x10; // control block expected to be on a paragraph boundary
|
begin += 4; // control block expected to be on a dword boundary
|
||||||
}
|
}
|
||||||
throw new InvalidEncryptionScheme ("No control block found inside TPM plugin");
|
throw new InvalidEncryptionScheme ("No control block found inside TPM plugin");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user