Skip to content

Commit

Permalink
Fix draw map overlay triggering assert
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlin96069 authored and lipsanen committed May 27, 2023
1 parent 32234ee commit 34cc6c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spt/features/visualizations/map_overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ void MapOverlay::LoadMapFile(std::string filename, Vector offsets, bool ztest)
std::vector<dleaf_t> leaves;
if (header.version < 20)
{
leaves_v0.reserve(header.lumps[LUMP_LEAFS].filelen / sizeof(dleaf_version_0_t));
leaves_v0.resize(header.lumps[LUMP_LEAFS].filelen / sizeof(dleaf_version_0_t));
READ_BYTES(mapFile, (char*)leaves_v0.data(), header.lumps[LUMP_LEAFS].filelen);
}
else
{
leaves.reserve(header.lumps[LUMP_LEAFS].filelen / sizeof(dleaf_t));
leaves.resize(header.lumps[LUMP_LEAFS].filelen / sizeof(dleaf_t));
READ_BYTES(mapFile, (char*)leaves.data(), header.lumps[LUMP_LEAFS].filelen);
}

Expand Down

0 comments on commit 34cc6c8

Please sign in to comment.