1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

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 <k-telaar@t-online.de>
Signed-off-by: Kevin Vu te Laar <vu.te@rwth-aachen.de>
This commit is contained in:
KeVteL 2024-10-05 13:25:46 +02:00 committed by al3xa23
parent 23af32d25e
commit 320e586fe7

View file

@ -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");