Cygwin: console: Fix argument of process_input_message() in read()

The commit fac73911f5 ("Cygwin: console: Fix typeahead input for
bash") introduced an argument to process_input_message() to restict
the maximum length to be processed by this function. However, the
commit failed to account for the number of chars already copied into
the buffer.  This patch corrects the argument to process_input_message()
to address this issue.

Fixes: fac73911f5 ("Cygwin: console: Fix typeahead input for bash")
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
This commit is contained in:
Takashi Yano committed 2026-09-13 20:22:39 +09:00
1 parent 935d5dae0f
commit 2ac3428a93
1 file changed
+1 -1
+1 -1
View File
@@ -1273,7 +1273,7 @@ wait_retry:
int ret;
acquire_input_mutex (mutex_timeout);
ret = process_input_message (buflen);
ret = process_input_message (buflen - copied_chars);
switch (ret)
{
case input_error: