Fix realloc failing on no-op

This commit is contained in:
Rerumu 2022-06-16 01:56:42 -04:00
parent 9a2b52fde5
commit 2db51b9b00

View File

@ -518,6 +518,10 @@ do
end end
function allocator.grow(memory, num) function allocator.grow(memory, num)
if num == 0 then
return memory.min
end
local old = memory.min local old = memory.min
local new = old + num local new = old + num