Module: wine Branch: master Commit: 9198ca27d09c68c4e1f2bac4e0b9867632ee5ed7 URL: https://source.winehq.org/git/wine.git/?a=commit;h=9198ca27d09c68c4e1f2bac4e...
Author: Eric Pouech eric.pouech@gmail.com Date: Thu Mar 24 14:46:40 2022 +0100
conhost: Correctly recompute start of edit line on ReadConsole.
Signed-off-by: Eric Pouech eric.pouech@gmail.com Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/conhost/conhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index 11e97993fd8..461adc05bcc 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -1426,8 +1426,8 @@ static NTSTATUS read_console( struct console *console, unsigned int ioctl, size_ if (offset > ctx->home_x) { int deltay; - offset -= ctx->home_x; - deltay = offset / console->active->width; + offset -= ctx->home_x + 1; + deltay = offset / console->active->width + 1; if (ctx->home_y >= deltay) ctx->home_y -= deltay; else