diff --git a/jsonpull.c b/jsonpull.c index 2bb822de..46f20d52 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"); }