a-game

2D platformer written from scratch.
Log | Files | Refs | README | LICENSE

commit 7bd3a9ae0e4e6defebb270df9050f57a4af3d600
parent b9625ced8f57ae97d7076d7176b42c2982c1c311
Author: Amin Mesbah <dev@aminmesbah.com>
Date:   Fri, 12 Jul 2019 20:52:49 -0700

Fix the allocator bug and load the tilemap

Diffstat:
Msrc/memory.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/memory.c b/src/memory.c @@ -24,8 +24,8 @@ internal void *mem_st_alloc(struct StackAllocator *allocator, size_t bytes, size size_t worst_case_bytes = bytes + alignment - 1; assert(allocator->used + worst_case_bytes <= allocator->size); - allocator->used += worst_case_bytes; uintptr_t current_head = (uintptr_t)allocator->base + allocator->used; + allocator->used += worst_case_bytes; void *address = (void *)mem_align_address(current_head, alignment); {