Skip to content

Commit 833e6a5

Browse files
committed
Old minor bndl1 fixes
1 parent f077c6d commit 833e6a5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/bundle.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ bool Bundle::LoadBNDL(binaryio::BinaryReader &reader)
172172
{
173173
reader.SetBigEndian(true); // Never released on PC.
174174

175-
/*m_revisionNumber = */reader.Read<uint32_t>(); // ???
176-
/*if (m_revisionNumber != 5)
177-
return false;*/
175+
m_revisionNumber = reader.Read<uint32_t>();
176+
if (m_revisionNumber < 3 || m_revisionNumber > 5)
177+
return false;
178178

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

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

209209

210210
m_entries.clear();
211+
m_debugInfoEntries.clear();
212+
m_dependencies.clear();
211213

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

327+
m_flags = static_cast<Flags>(m_flags | HasResourceStringTable);
328+
325329
auto rstReader = binaryio::BinaryReader(std::move(rstFile));
326330

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

0 commit comments

Comments
 (0)