summary refs log tree commit diff stats
path: root/Source/Memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Memory.h')
-rw-r--r--Source/Memory.h4
1 files changed, 2 insertions, 2 deletions
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:
41 41
42 template <class T> 42 template <class T>
43 void WriteNewArray(int id, int offset, const std::vector<T>& data) { 43 void WriteNewArray(int id, int offset, const std::vector<T>& data) {
44 uintptr_t addr = VirtualAllocEx(_handle, nullptr, data.size() * sizeof(T), MEM_RESERVE | MEM_COMMIT, MEM_READWRITE); 44 uintptr_t addr = (uintptr_t)VirtualAllocEx(_handle, nullptr, data.size() * sizeof(T), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
45 _allocations.emplace_back(addr); 45 _allocations.emplace_back(addr);
46 WriteEntityData(id, offset, addr); 46 WriteEntityData<uintptr_t>(id, offset, {addr});
47 WriteArray(id, offset, data); 47 WriteArray(id, offset, data);
48 } 48 }
49 49