Fix printing of json_value

This commit is contained in:
olemorud
2023-04-28 18:25:02 +02:00
parent 05e78fa523
commit 4201755246
3 changed files with 5 additions and 2 deletions

View File

@@ -225,7 +225,7 @@ void print_array(struct json_value** arr, int cur_indent, int indent_amount)
return;
}
for (size_t i = 0; arr[i + 1] != NULL; i++) {
for (size_t i = 0; arr[i] != NULL; i++) {
putchar('\n');
add_indent(cur_indent);
print_json_value(*arr[i], cur_indent + indent_amount, indent_amount);

View File

@@ -36,7 +36,7 @@ int main(int argc, char* argv[])
struct json_value x = parse_json_value(fp);
// print_json(x, 1);
print_json(x, 1);
json_value_delete(x);