diff options
Diffstat (limited to 'capture.c')
-rw-r--r-- | capture.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -30,7 +30,12 @@ line_monitor(const char *ptr, size_t sz, void *closure) { struct line_closure *lc = closure; - if (lc->len || ptr[sz-1] != '\n') { + if (sz == 0) { + if (lc->len) { + call_monitor(lc->cv, lc->str, lc->len); + lc->len = 0; + } + } else if (lc->len || ptr[sz-1] != '\n') { size_t newsz = lc->len + sz + 1; if (newsz > lc->size) { |