Skip to content

Commit 873abe8

Browse files
committed
[FREELDR] vidfb.c: Fix coordinates validation in VidFbOutputChar()
Its purpose is to verify that we don't output characters outside of the screen. Addendum to commit 379eb14 (PR reactos#8530)
1 parent ef60fb2 commit 873abe8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

boot/freeldr/freeldr/arch/vidfb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ VidFbOutputChar(
227227
ULONG Line, Col;
228228

229229
/* Don't display outside of the screen, nor partial characters */
230-
if ((X + CHAR_WIDTH >= framebufInfo.ScreenWidth) ||
231-
(Y + CHAR_HEIGHT >= (framebufInfo.ScreenHeight - 2 * TOP_BOTTOM_LINES)))
230+
if ((X + CHAR_WIDTH - 1 >= framebufInfo.ScreenWidth) ||
231+
(Y + CHAR_HEIGHT - 1 >= (framebufInfo.ScreenHeight - 2 * TOP_BOTTOM_LINES)))
232232
{
233233
return;
234234
}

0 commit comments

Comments
 (0)