mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
fix(lua): fix pointer.allocate allocating the wrong number of bytes (#2941)
This commit is contained in:
parent
6f8490f450
commit
a46d6d0fae
@ -107,7 +107,7 @@ namespace lua::memory
|
||||
// Returns: pointer: A pointer to the newly allocated memory.
|
||||
static pointer allocate(int size, sol::this_state state)
|
||||
{
|
||||
void* mem = new uint8_t[](size);
|
||||
void* mem = new uint8_t[size]();
|
||||
|
||||
big::lua_module* module = sol::state_view(state)["!this"];
|
||||
module->m_allocated_memory.push_back(mem);
|
||||
|
Loading…
Reference in New Issue
Block a user