json: fix parsing first array-array element
Previously, the first element inside the array-array didn't contain the decoded data. Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
This commit is contained in:
parent
ed76b915cb
commit
5e7ef8be5a
3 changed files with 31 additions and 8 deletions
|
@ -360,11 +360,14 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
|
|||
.offset = offsetof(struct_, \
|
||||
len_field_), \
|
||||
{ \
|
||||
.object = { \
|
||||
.sub_descr = \
|
||||
.array = { \
|
||||
.element_descr = \
|
||||
elem_descr_, \
|
||||
.sub_descr_len = \
|
||||
elem_descr_len_, \
|
||||
.n_elements = \
|
||||
1 + \
|
||||
ZERO_OR_COMPILE_ERROR( \
|
||||
elem_descr_len_ == 1 \
|
||||
), \
|
||||
}, \
|
||||
}, \
|
||||
} }, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue