We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0da3055 commit e34dbfaCopy full SHA for e34dbfa
jsonwriter.c
@@ -52,8 +52,10 @@ static inline size_t jsonwriter_output_buff_write(struct jsonwriter_output_buff
52
if(n) {
53
if(n + b->used > JSONWRITER_OUTPUT_BUFF_SIZE) {
54
jsonwriter_output_buff_flush(b);
55
- if(n > JSONWRITER_OUTPUT_BUFF_SIZE) // n too big, so write directly
+ if(n > JSONWRITER_OUTPUT_BUFF_SIZE) { // n too big, so write directly
56
b->write(s, n, 1, b->write_arg);
57
+ return n;
58
+ }
59
}
60
// n + used < buff size
61
memcpy(b->buff + b->used, s, n);
0 commit comments