fix that cxJsonFromString() stores NULL instead of a "nothing" value in case of a fill error

Wed, 10 Dec 2025 22:16:19 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 10 Dec 2025 22:16:19 +0100
changeset 1565
fb314eeca7a4
parent 1564
500e3c744d87
child 1566
2ebbcb38986d

fix that cxJsonFromString() stores NULL instead of a "nothing" value in case of a fill error

src/json.c file | annotate | diff | comparison | revisions
--- a/src/json.c	Wed Dec 10 22:03:08 2025 +0100
+++ b/src/json.c	Wed Dec 10 22:16:19 2025 +0100
@@ -794,7 +794,7 @@
 
 CxJsonStatus cx_json_from_string(const CxAllocator *allocator,
             cxstring str, CxJsonValue **value) {
-    *value = NULL;
+    *value = &cx_json_value_nothing;
     CxJson parser;
     cxJsonInit(&parser, allocator);
     if (cxJsonFill(&parser, str)) {

mercurial