X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/6d1138864fc75651ce79aa2748deb7feba1bac91..8c09f18633959f215ad0b2d3c3d71d18fd654afd:/misc.c diff --git a/misc.c b/misc.c index 78d829a9..09e6db57 100644 --- a/misc.c +++ b/misc.c @@ -181,6 +181,8 @@ void bufchain_add(bufchain *ch, const void *data, int len) { const char *buf = (const char *)data; + if (len == 0) return; + ch->buffersize += len; if (ch->tail && ch->tail->buflen < BUFFER_GRANULE) {