Commit e85220dd authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Fixed off-by-one bug in async output buffers.

parent 6ee9a5e7
......@@ -270,7 +270,7 @@ static void comm_notification(int fd,void*private)
/* write from output queue */
prev = comm_outbuf(ptr);
do {
bleft = ((ptr->obuf_tail < ptr->obuf_head) ? ptr->obuf_head : ptr->obuf_size)
bleft = ((ptr->obuf_tail <= ptr->obuf_head) ? ptr->obuf_head : ptr->obuf_size)
- ptr->obuf_tail;
len = bleft ? write(fd, ptr->outbuf + ptr->obuf_tail, bleft) : 0;
if (len > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment