Skip to content
Snippets Groups Projects
Commit e85220dd authored by Ove Kåven's avatar Ove Kåven Committed by Alexandre Julliard
Browse files

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

parent 6ee9a5e7
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment