Skip to content

Commit

Permalink
Update buff_diff
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Oct 31, 2024
1 parent 9009d20 commit bcc1874
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/ndpi_serializer.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ void ndpi_reset_serializer(ndpi_serializer *_serializer) {
if (!serializer->multiline_json_array) {
/* Note: please keep a space at the beginning as it is used for arrays when an end-of-record is used */
serializer->buffer.data[serializer->status.buffer.size_used++] = ' ';
buff_diff = serializer->buffer.size - serializer->status.buffer.size_used;
}
if (!serializer->inner_json) {
serializer->status.buffer.size_used += ndpi_snprintf((char *) &serializer->buffer.data[serializer->status.buffer.size_used], buff_diff, "{}");
Expand Down

0 comments on commit bcc1874

Please sign in to comment.