From: Filip Navara Date: Sun, 13 Nov 2005 08:24:15 +0000 (+0000) Subject: Fix the clipping checks in TuiFillArea. X-Git-Tag: backups/ros-branch-0_2_9@19949~703 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=0cd1d327a252335dfb97aa72f1f83f64f051529d Fix the clipping checks in TuiFillArea. svn path=/trunk/; revision=19202 --- diff --git a/reactos/boot/freeldr/freeldr/ui/tui.c b/reactos/boot/freeldr/freeldr/ui/tui.c index 91b13139ebe..7a99bf82789 100644 --- a/reactos/boot/freeldr/freeldr/ui/tui.c +++ b/reactos/boot/freeldr/freeldr/ui/tui.c @@ -190,19 +190,18 @@ VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar ULONG i, j; // Clip the area to the screen - // FIXME: This code seems to have problems... Uncomment and view ;-) - /*if ((Left >= UiScreenWidth) || (Top >= UiScreenHeight)) + if ((Left >= UiScreenWidth) || (Top >= UiScreenHeight)) { return; } - if ((Left + Right) >= UiScreenWidth) + if (Right >= UiScreenWidth) { - Right = UiScreenWidth - Left; + Right = UiScreenWidth - 1; } - if ((Top + Bottom) >= UiScreenHeight) + if (Bottom >= UiScreenHeight) { - Bottom = UiScreenHeight - Top; - }*/ + Bottom = UiScreenHeight - 1; + } // Loop through each line and fill it in for (i=Top; i<=Bottom; i++)