Fix #7590: decrement allocated_size in ScriptAllocator::Free()

This commit is contained in:
glx 2019-05-13 21:55:02 +02:00 committed by glx22
parent de73c8f91c
commit aac4255d43
1 changed files with 1 additions and 0 deletions

View File

@ -93,6 +93,7 @@ struct ScriptAllocator {
{
if (p == nullptr) return;
free(p);
this->allocated_size -= size;
#ifdef SCRIPT_DEBUG_ALLOCATIONS
assert(this->allocations.at(p) == size);