From 695d0e12950b9df248ea7b84f8434e32acc84f11 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Mon, 18 Nov 2019 08:43:27 -0800 Subject: actually free memory --- Source/Memory.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Memory.h') diff --git a/Source/Memory.h b/Source/Memory.h index 70a271e..79fbaba 100644 --- a/Source/Memory.h +++ b/Source/Memory.h @@ -41,9 +41,9 @@ public: template void WriteNewArray(int id, int offset, const std::vector& data) { - uintptr_t addr = VirtualAllocEx(_handle, nullptr, data.size() * sizeof(T), MEM_RESERVE | MEM_COMMIT, MEM_READWRITE); + uintptr_t addr = (uintptr_t)VirtualAllocEx(_handle, nullptr, data.size() * sizeof(T), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); _allocations.emplace_back(addr); - WriteEntityData(id, offset, addr); + WriteEntityData(id, offset, {addr}); WriteArray(id, offset, data); } -- cgit 1.4.1