From 530ecc6a5dac151fdff8d84f525ae5812aad7ed3 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 1 Jan 2023 13:43:03 +0100 Subject: console: Fix checking negative cursor coordinates --- console/display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/console/display.c b/console/display.c index 068fe160..5c821938 100644 --- a/console/display.c +++ b/console/display.c @@ -1072,12 +1072,12 @@ void limit_cursor (display_t display) if (user->cursor.col >= user->screen.width) user->cursor.col = user->screen.width - 1; - else if (user->cursor.col < 0) + else if ((int32_t) user->cursor.col < 0) user->cursor.col = 0; if (user->cursor.row >= user->screen.height) user->cursor.row = user->screen.height - 1; - else if (user->cursor.row < 0) + else if ((int32_t) user->cursor.row < 0) user->cursor.row = 0; /* XXX Flag cursor change. */ -- cgit v1.2.3