Fix initializing memory off by 1

This commit is contained in:
Rerumu 2022-05-26 19:19:16 -04:00
parent a261e3faa1
commit 8d4da9547c

View File

@ -506,7 +506,7 @@ do
end end
function allocator.init(memory, addr, data) function allocator.init(memory, addr, data)
ffi.copy(by_offset(memory.data, addr), data, #data - 1) ffi.copy(by_offset(memory.data, addr), data, #data)
end end
function allocator.grow(memory, num) function allocator.grow(memory, num)