Skip to content

Commit 0544965

Browse files
committed
JSON converter: fix malformed JSON output when an octetBytes field with zero size is converted
1 parent 69b1677 commit 0544965

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/converters/json.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ to_octet(struct context *buffer, const struct fds_drec_field *field)
229229
{
230230
if (field->size <= 8) {
231231
// Print as unsigned integer
232-
to_uint(buffer, field);
233-
return FDS_OK;
232+
return to_uint(buffer, field);
234233
}
235234

236235
const size_t mem_req = (2 * field->size) + 5U; // "0x" + 2 chars per byte + 2x "\"" + "\0"

0 commit comments

Comments
 (0)