Eric Pouech : conhost: Correctly recompute start of edit line on ReadConsole.

Alexandre Julliard julliard at winehq.org
Fri Mar 25 15:28:09 CDT 2022


Module: wine
Branch: master
Commit: 9198ca27d09c68c4e1f2bac4e0b9867632ee5ed7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9198ca27d09c68c4e1f2bac4e0b9867632ee5ed7

Author: Eric Pouech <eric.pouech at 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 at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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




More information about the wine-cvs mailing list