From 3ee2c4ac1ceeaa188f16e4b9979ecbf238bf97e1 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 22 Jan 2014 22:42:59 +0000 Subject: [PATCH] [fbcon] Allow ANSI CUP with missing arguments Signed-off-by: Michael Brown --- src/core/fbcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/fbcon.c b/src/core/fbcon.c index 32ae43be..72d6a678 100644 --- a/src/core/fbcon.c +++ b/src/core/fbcon.c @@ -294,10 +294,10 @@ static void fbcon_handle_cup ( struct ansiesc_context *ctx, fbcon_draw_cursor ( fbcon, 0 ); fbcon->xpos = cx; if ( fbcon->xpos >= fbcon->character.width ) - fbcon->xpos = ( fbcon->character.width - 1 ); + fbcon->xpos = 0; fbcon->ypos = cy; if ( fbcon->ypos >= fbcon->character.height ) - fbcon->ypos = ( fbcon->character.height - 1 ); + fbcon->ypos = 0; fbcon_draw_cursor ( fbcon, fbcon->show_cursor ); }