From: Marc-André Lureau <[email protected]> The loop condition used `y <= s->height` instead of `y < s->height`, causing vc_clear_xy() to be called with y == s->height. This clears a row in the scrollback buffer beyond the visible screen.
Reviewed-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Marc-André Lureau <[email protected]> (cherry picked from commit 181fdf8a7e13c0460a26777ff9301e0ecdca3784) Signed-off-by: Michael Tokarev <[email protected]> diff --git a/ui/console-vc.c b/ui/console-vc.c index df1341513d..f4aaf6950d 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -899,7 +899,7 @@ static void vc_putchar(VCChardev *vc, int ch) break; case 2: /* clear entire screen */ - for (y = 0; y <= s->height; y++) { + for (y = 0; y < s->height; y++) { for (x = 0; x < s->width; x++) { vc_clear_xy(vc, x, y); } -- 2.47.3
