another write_to_buf_zlib fix.

svn:r6656
This commit is contained in:
Nick Mathewson 2006-06-18 16:20:38 +00:00
parent b5c599412f
commit 5ba72d0ae5

View File

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