diff options
author | glx <glx@openttd.org> | 2019-05-13 21:55:02 +0200 |
---|---|---|
committer | glx22 <glx22@users.noreply.github.com> | 2019-05-15 21:59:57 +0200 |
commit | aac4255d43bf6cdc763cba0c1244a9c2e0fad055 (patch) | |
tree | 75efca4e23a24f4ddc29e292d36614b916d2d2b1 /src | |
parent | de73c8f91c56d9bd0e2c4bfb9791995450932e49 (diff) | |
download | openttd-aac4255d43bf6cdc763cba0c1244a9c2e0fad055.tar.xz |
Fix #7590: decrement allocated_size in ScriptAllocator::Free()
Diffstat (limited to 'src')
-rw-r--r-- | src/script/squirrel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); |