Remove all the "assert(len>0)" which forbade zero-length writes across the
[u/mdw/putty] / misc.c
diff --git a/misc.c b/misc.c
index 78d829a..09e6db5 100644 (file)
--- 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) {