From 9a51f441c0df5e341cec3c32c9ab3489afbc97a4 Mon Sep 17 00:00:00 2001 From: darknessWONG Date: Thu, 23 May 2024 17:16:27 +0800 Subject: [PATCH] Stack allcoator bugfix --- src/StackAllocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StackAllocator.cpp b/src/StackAllocator.cpp index 3d83194..ed30d55 100644 --- a/src/StackAllocator.cpp +++ b/src/StackAllocator.cpp @@ -38,7 +38,7 @@ void* StackAllocator::Allocate(const std::size_t size, const std::size_t alignme const std::size_t headerAddress = nextAddress - sizeof (AllocationHeader); AllocationHeader allocationHeader{padding}; AllocationHeader * headerPtr = (AllocationHeader*) headerAddress; - headerPtr = &allocationHeader; + *headerPtr = allocationHeader; m_offset += size;