diff -r 15b3ca7ee33f -r 8aa57a7fecc4 src/buffer.c --- a/src/buffer.c Mon Nov 18 22:05:42 2024 +0100 +++ b/src/buffer.c Sat Nov 23 14:45:32 2024 +0100 @@ -38,7 +38,9 @@ const CxAllocator *allocator, int flags ) { - if (allocator == NULL) allocator = cxDefaultAllocator; + if (allocator == NULL) { + allocator = cxDefaultAllocator; + } buffer->allocator = allocator; buffer->flags = flags; if (!space) { @@ -75,6 +77,9 @@ const CxAllocator *allocator, int flags ) { + if (allocator == NULL) { + allocator = cxDefaultAllocator; + } CxBuffer *buf = cxMalloc(allocator, sizeof(CxBuffer)); if (buf == NULL) return NULL; if (0 == cxBufferInit(buf, space, capacity, allocator, flags)) {