a-game

2D platformer written from scratch.
git clone git://git.amin.space/a-game.git
Log | Files | Refs | README | LICENSE

commit cdc7f9a68179e22669dbcebd141e84a0e61a447a
parent ce0179e8dfb970f8592506e76e223fdfc18cda11
Author: amin <dev@aminmesbah.com>
Date:   Sat, 13 Jul 2019 04:05:37 +0000

Fix the allocator bug and load the tilemap

FossilOrigin-Name: dc40cd6702d28a4a1ac50c9fe4de0a1c55db32710a1de43cb7d0c812c87f5718
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); {