[PATCH] conhost: Fix status for READ_CONSOLE ioctl

Jacek Caban jacek at codeweavers.com
Wed Dec 29 10:12:42 CST 2021


Hi Keno,

On 12/29/21 16:10, Keno Fischer wrote:
> diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
> index 78f6e345170..64a77e52b43 100644
> --- a/programs/conhost/conhost.c
> +++ b/programs/conhost/conhost.c
> @@ -1385,7 +1385,14 @@ static NTSTATUS read_console( struct console *console, unsigned int ioctl, size_
>       if (edit_line_grow( console, 1 )) console->edit_line.buf[0] = 0;
>   
>       console->pending_read = out_size;
> -    return process_console_input( console );
> +
> +    /* If there are any pending input records, cook them now. */
> +    if (console->record_count)
> +    {
> +        process_console_input( console );
> +    }
> +
> +    return console->edit_line.status;


process_console_input() generally handles 0 record_count, what's exactly 
wrong there? Does the attached patch help?


Thanks,

Jacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 1463 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211229/13f4e34e/attachment.bin>


More information about the wine-devel mailing list