# HG changeset patch # User Mike Becker # Date 1650815092 -7200 # Node ID 0e893f84a7dd11750de42601f82f2d1b8f6bdd55 # Parent 8d70ad8da89963bf78c932f52e88a32d95d4cd19 fix cxBufferMinimumCapacity not using the allocator diff -r 8d70ad8da899 -r 0e893f84a7dd src/buffer.c --- a/src/buffer.c Sun Apr 24 17:29:34 2022 +0200 +++ b/src/buffer.c Sun Apr 24 17:44:52 2022 +0200 @@ -119,9 +119,7 @@ return 0; } - unsigned char *newspace = realloc(buffer->bytes, newcap); - if (newspace) { - buffer->bytes = newspace; + if (cxReallocate(buffer->allocator, &buffer->bytes, newcap) == 0) { buffer->capacity = newcap; return 0; } else {