src/properties.c

changeset 1557
03fbf1c99e73
parent 1555
8972247f54e8
child 1558
fc863c877a75
--- a/src/properties.c	Sun Dec 07 19:36:51 2025 +0100
+++ b/src/properties.c	Mon Dec 08 23:09:11 2025 +0100
@@ -253,7 +253,7 @@
 const unsigned cx_properties_load_buf_size = CX_PROPERTIES_LOAD_BUF_SIZE;
 
 CxPropertiesStatus cx_properties_load(CxPropertiesConfig config,
-        cxstring filename, CxMap *target) {
+        const CxAllocator *allocator, cxstring filename, CxMap *target) {
     // sanity check for the map
     const bool use_cstring = cxCollectionStoresPointers(target);
     if (!use_cstring && cxCollectionElementSize(target) != sizeof(cxmutstr)) {
@@ -302,7 +302,7 @@
             if (status != CX_PROPERTIES_NO_ERROR) {
                 break;
             } else {
-                cxmutstr v = cx_strdup(value);
+                cxmutstr v = cx_strdup_a(allocator, value);
                 if (v.ptr == NULL) {
                     status = CX_PROPERTIES_MAP_ERROR;
                     break;

mercurial