Skip to content

Commit

Permalink
Old minor bndl1 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed Mar 24, 2024
1 parent f077c6d commit 833e6a5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/bundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ bool Bundle::LoadBNDL(binaryio::BinaryReader &reader)
{
reader.SetBigEndian(true); // Never released on PC.

/*m_revisionNumber = */reader.Read<uint32_t>(); // ???
/*if (m_revisionNumber != 5)
return false;*/
m_revisionNumber = reader.Read<uint32_t>();
if (m_revisionNumber < 3 || m_revisionNumber > 5)
return false;

const auto numEntries = reader.Read<uint32_t>();

Expand Down Expand Up @@ -208,6 +208,8 @@ bool Bundle::LoadBNDL(binaryio::BinaryReader &reader)


m_entries.clear();
m_debugInfoEntries.clear();
m_dependencies.clear();

reader.Seek(idListOffset);
std::vector<uint32_t> resourceIDs;
Expand Down Expand Up @@ -322,6 +324,8 @@ bool Bundle::LoadBNDL(binaryio::BinaryReader &reader)
if (rstFile == nullptr)
return true;

m_flags = static_cast<Flags>(m_flags | HasResourceStringTable);

auto rstReader = binaryio::BinaryReader(std::move(rstFile));

const auto strLen = rstReader.Read<uint32_t>();
Expand Down

0 comments on commit 833e6a5

Please sign in to comment.