From 9cc63ed4a34ce35bdf00f4fefb5d97380c4589a6 Mon Sep 17 00:00:00 2001 From: Carl Smith Date: Tue, 24 Oct 2023 21:29:30 +1300 Subject: [PATCH] Correctly add missing values when adding defaults Previously the tree passed in always had empty nodes for values due to apteryx_query behaviour. Now it is possible for the value to be NULL and this code is hit but did not work. It has been fixed. --- schema.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.c b/schema.c index 4dc63fe..35f74ca 100644 --- a/schema.c +++ b/schema.c @@ -3345,7 +3345,7 @@ _sch_traverse_nodes (sch_node * schema, GNode * parent, int flags) /* Add missing values */ else if (!APTERYX_HAS_VALUE (child)) { - APTERYX_NODE (child->children, value); + APTERYX_NODE (child, value); value = NULL; } /* Replace empty value */