Commit: d91e93598de2c6f76a53a02aa7e9884fa9d02835
Parent: 5b525bd50ff1c2a2d33906a2b5cc9a7fa7db92aa
Author: Tyler Henry
Date: Thu, 18 Jun 2026 12:40:40 -0600
w32: fixed new entity allocation when freelist is empty
fixes: #66
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main_w32.c b/main_w32.c
@@ -145,7 +145,7 @@ os_entity_allocate(OSW32EntityKind kind)
DeferLoop(take_lock(&os_w32_context.arena_lock, -1), release_lock(&os_w32_context.arena_lock))
{
result = SLLPopFreelist(os_w32_context.entity_freelist);
- if (!result) push_struct_no_zero(&os_w32_context.arena, OSW32Entity);
+ if (!result) result = push_struct_no_zero(&os_w32_context.arena, OSW32Entity);
}
zero_struct(result);