From 14b31eb647511b152212244d500214d16bc95977 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 13 Dec 2024 19:01:49 +0000 Subject: [PATCH] Bugfix: conf: Handle null values correctly (as if they don't exist) and fail some invalid cases more gracefully --- src/datum_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/datum_conf.c b/src/datum_conf.c index 103e5d7..b1d0513 100644 --- a/src/datum_conf.c +++ b/src/datum_conf.c @@ -262,7 +262,7 @@ int datum_read_config(const char *conffile) { config = load_json_from_file(conffile); - if (!config) { + if (!json_is_object(config)) { DLOG_FATAL("Could not read configuration JSON file!"); return -1; } @@ -270,10 +270,10 @@ int datum_read_config(const char *conffile) { for (i=0;i