From 95410dbf33fe90c477f5c5092cea6c467db63e0b Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Wed, 5 Feb 2014 21:29:40 -0800 Subject: [PATCH] Fix logic error that broke top-level hashes --- jsonpull.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonpull.c b/jsonpull.c index 2bb822d..46f20d5 100644 --- a/jsonpull.c +++ b/jsonpull.c @@ -129,7 +129,7 @@ json_object *json_parse(FILE *f, json_object *current) { if (current->parent == NULL || current->parent->type != JSON_HASH) { json_error("} without {\n"); } - if (current->parent->hash != NULL || current->parent->hash->value == NULL) { + if (current->parent->hash != NULL && current->parent->hash->value == NULL) { json_error("} without hash value\n"); }