mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
Fixed off-by-one bug in async output buffers.
This commit is contained in:
parent
6ee9a5e718
commit
e85220dd0b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user