plugins/offers: fix JSON output of decode when there are unknown fields.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2024-07-18 11:01:55 +09:30
parent 1e2c6a5837
commit ea4025b1ed

View File

@@ -718,6 +718,7 @@ static void json_add_extra_fields(struct json_stream *js,
json_add_u64(js, "length", fields[i].length);
json_add_hex(js, "value",
fields[i].value, fields[i].length);
json_object_end(js);
}
if (have_extra)
json_array_end(js);