only allocate non-zero capacities

This commit is contained in:
2025-12-06 14:19:33 +01:00
parent f676cff0e7
commit b912759050
+1 -1
View File
@@ -9,7 +9,7 @@ static void arena_reset(arena_allocator_t *this) {
allocator_reset(this->allocator); allocator_reset(this->allocator);
this->data = NULL; this->data = NULL;
} }
if (this->data == NULL) { if (this->data == NULL && this->capacity != 0) {
this->data = allocator_alloc(this->allocator, this->capacity); this->data = allocator_alloc(this->allocator, this->capacity);
} }
this->size = 0; this->size = 0;