Skip to content

Commit

Permalink
Fixed crash caused by failure to allocate memory block of very specia…
Browse files Browse the repository at this point in the history
…l size

Allocation of 810 FState objects (32400 bytes in total) could be performed in MSVC x64 build but worked in 32-bit version
This fixes https://mantis.zdoom.org/view.php?id=602
  • Loading branch information
alexey-lysiuk committed Apr 19, 2017
1 parent 29402ff commit 403634c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/memarena.cpp
Expand Up @@ -255,7 +255,7 @@ FMemArena::Block *FMemArena::AddBlock(size_t size)

void FMemArena::Block::Reset()
{
Avail = RoundPointer(this + sizeof(*this));
Avail = RoundPointer(reinterpret_cast<char*>(this) + sizeof(*this));
}

//==========================================================================
Expand Down

0 comments on commit 403634c

Please sign in to comment.