Fix realloc failing on no-op
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user