Browse Source

another write_to_buf_zlib fix.

svn:r6656
Nick Mathewson 18 years ago
parent
commit
5ba72d0ae5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/or/buffers.c

+ 1 - 1
src/or/buffers.c

@@ -1305,7 +1305,7 @@ write_to_buf_zlib(buf_t *buf, tor_zlib_state_t *state,
     if (next < buf->cur)
       old_avail = avail = buf->cur - next;
     else
-      old_avail = avail = (buf->mem + buf->datalen) - buf->cur;
+      old_avail = avail = (buf->mem + buf->datalen) - next;
     switch (tor_zlib_process(state, &next, &avail, &data, &data_len, done)) {
       case TOR_ZLIB_DONE:
         over = 1;