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>
This commit is contained in:
Eric Pouech 2022-03-24 14:46:40 +01:00 committed by Alexandre Julliard
parent 731a968003
commit 9198ca27d0
1 changed files with 2 additions and 2 deletions

View File

@ -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