1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 16:29:55 +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*>(header), 16);
input.read(reinterpret_cast<char*>(&fileTableOffset), 8); input.read(reinterpret_cast<char*>(&fileTableOffset), 8);
if (header[0] == 0x00415342) /*"BSA\x00"*/ if (header[0] != ESM::fourCC("BTDX"))
fail("Unrecognized compressed BSA format"); fail("Unrecognized BA2 signature");
mVersion = header[1]; mVersion = header[1];
switch (static_cast<BA2Version>(mVersion)) 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*>(header), 16);
input.read(reinterpret_cast<char*>(&fileTableOffset), 8); input.read(reinterpret_cast<char*>(&fileTableOffset), 8);
if (header[0] == 0x00415342) /*"BSA\x00"*/ if (header[0] != ESM::fourCC("BTDX"))
fail("Unrecognized compressed BSA format"); fail("Unrecognized BA2 signature");
mVersion = header[1]; mVersion = header[1];
switch (static_cast<BA2Version>(mVersion)) switch (static_cast<BA2Version>(mVersion))
{ {