From aac4255d43bf6cdc763cba0c1244a9c2e0fad055 Mon Sep 17 00:00:00 2001 From: glx Date: Mon, 13 May 2019 21:55:02 +0200 Subject: Fix #7590: decrement allocated_size in ScriptAllocator::Free() --- src/script/squirrel.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/script') diff --git a/src/script/squirrel.cpp b/src/script/squirrel.cpp index ea63944ea..275a89c74 100644 --- a/src/script/squirrel.cpp +++ b/src/script/squirrel.cpp @@ -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); -- cgit v1.2.3-70-g09d2