Fix realloc failing on no-op

This commit is contained in:
Rerumu
2022-06-16 06:33:03 -04:00
parent 9a2b52fde5
commit 2db51b9b00
+4
View File
@@ -518,6 +518,10 @@ do
end
function allocator.grow(memory, num)
if num == 0 then
return memory.min
end
local old = memory.min
local new = old + num