Fix logic error that broke top-level hashes

This commit is contained in:
Eric Fischer
2014-02-05 21:29:40 -08:00
parent 7983c66add
commit 95410dbf33
+1 -1
View File
@@ -129,7 +129,7 @@ json_object *json_parse(FILE *f, json_object *current) {
if (current->parent == NULL || current->parent->type != JSON_HASH) { if (current->parent == NULL || current->parent->type != JSON_HASH) {
json_error("} without {\n"); 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"); json_error("} without hash value\n");
} }