1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-06 00:40:04 +00:00

Fix BA2 signature check

This commit is contained in:
Alexei Kotov 2024-04-26 10:31:44 +03:00
parent 22fb3d7f83
commit b32385a0af
2 changed files with 4 additions and 4 deletions

View File

@ -113,8 +113,8 @@ namespace Bsa
input.read(reinterpret_cast<char*>(header), 16);
input.read(reinterpret_cast<char*>(&fileTableOffset), 8);
if (header[0] == 0x00415342) /*"BSA\x00"*/
fail("Unrecognized compressed BSA format");
if (header[0] != ESM::fourCC("BTDX"))
fail("Unrecognized BA2 signature");
mVersion = header[1];
switch (static_cast<BA2Version>(mVersion))
{

View File

@ -107,8 +107,8 @@ namespace Bsa
input.read(reinterpret_cast<char*>(header), 16);
input.read(reinterpret_cast<char*>(&fileTableOffset), 8);
if (header[0] == 0x00415342) /*"BSA\x00"*/
fail("Unrecognized compressed BSA format");
if (header[0] != ESM::fourCC("BTDX"))
fail("Unrecognized BA2 signature");
mVersion = header[1];
switch (static_cast<BA2Version>(mVersion))
{