diff --git a/components/bsa/bsa_file.cpp b/components/bsa/bsa_file.cpp index a8604dfe83..8fc2d3f8d9 100644 --- a/components/bsa/bsa_file.cpp +++ b/components/bsa/bsa_file.cpp @@ -365,12 +365,14 @@ BsaVersion Bsa::BSAFile::detectVersion(const std::filesystem::path& filePath) if (head[0] == ESM::fourCC("BTDX")) { - // head[1] should contains 0x01 it is checked if we want to open this kind of archive - if (head[2] == ESM::fourCC("GNRL")) - return BSAVER_BA2_GNRL; - if (head[2] == ESM::fourCC("DX10")) - return BSAVER_BA2_DX10; - return BSAVER_UNKNOWN; + if (head[1] == static_cast(0x01)) + { + if (head[2] == ESM::fourCC("GNRL")) + return BSAVER_BA2_GNRL; + if (head[2] == ESM::fourCC("DX10")) + return BSAVER_BA2_DX10; + } + return BSAVER_COMPRESSED; } return BSAVER_UNKNOWN;