dbutils/field.c

changeset 8
bd08116b8af4
parent 7
c98ff52cd806
--- a/dbutils/field.c	Fri Dec 13 11:24:55 2024 +0100
+++ b/dbutils/field.c	Sat Dec 14 17:03:31 2024 +0100
@@ -1089,11 +1089,11 @@
     }
     return obj;
 }
-static int linkedlist_add(DBUObjectResult *result, DBUObject parent, void *obj, CxList *fk, const CxAllocator *a) {
+static int linkedlist_add(DBUObjectResult *result, DBUObject parent, DBUClass *type, void *obj, CxList *fk, const CxAllocator *a) {
     DBUOffsetField *field  = result->userdata1;
     DBUClass *cls = result->userdata2;
     CxList **list = (CxList**)(parent+field->offset);
-    if(*list) {
+    if(!*list) {
         *list = cxLinkedListCreate(a, NULL, CX_STORE_POINTERS);
         if(!(*list)) {
             return 1;

mercurial