From 320e586fe7daf9b234df4946ace143c791c34c1c Mon Sep 17 00:00:00 2001 From: KeVteL <61628757+KeVteL@users.noreply.github.com> Date: Sat, 5 Oct 2024 13:25:46 +0200 Subject: [PATCH] Bugfix node.cpp logic error throws error if json_t *json is a json object should throw an error if that *json weren't a valid json_object Signed-off-by: KeVteL <61628757+KeVteL@users.noreply.github.com> Signed-off-by: KeVteL Signed-off-by: Kevin Vu te Laar --- lib/node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node.cpp b/lib/node.cpp index 20b280e62..5c60215b4 100644 --- a/lib/node.cpp +++ b/lib/node.cpp @@ -437,7 +437,7 @@ Node *NodeFactory::make(json_t *json, const uuid_t &id, std::string type; Node *n; - if (json_is_object(json)) + if (!json_is_object(json)) throw ConfigError(json, "node-config-node", "Node configuration must be an object");