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

This commit is contained in:
Ove Kaaven 1999-05-01 10:18:21 +00:00 committed by Alexandre Julliard
parent 6ee9a5e718
commit e85220dd0b

View File

@ -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) {