diff --git a/arena_allocator.c b/arena_allocator.c index 1c63cbe..6a12df1 100644 --- a/arena_allocator.c +++ b/arena_allocator.c @@ -9,7 +9,7 @@ static void arena_reset(arena_allocator_t *this) { allocator_reset(this->allocator); this->data = NULL; } - if (this->data == NULL) { + if (this->data == NULL && this->capacity != 0) { this->data = allocator_alloc(this->allocator, this->capacity); } this->size = 0;