Commit 9198f9e4 authored by nanahira's avatar nanahira Committed by GitHub

Update LuaMemTracker.cpp

Co-authored-by: default avatarCopilot <175728472+Copilot@users.noreply.github.com>
parent eb324716
......@@ -35,7 +35,7 @@ void* LuaMemTracker::AllocThunk(void* ud, void* ptr, size_t osize, size_t nsize)
void* LuaMemTracker::Alloc(void* ptr, size_t osize, size_t nsize) {
if (nsize == 0) {
if (ptr && osize <= total_allocated) {
if (ptr) {
total_allocated -= osize;
}
return real_alloc(real_ud, ptr, osize, nsize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment