Hi,

Here is another small patch. Please see the commit message of the patch for details. The merge request on salsa is also updated.


Best Regards,
Zhang Boyang
From 36020995b989563efed3cfe6028cd93c192c0208 Mon Sep 17 00:00:00 2001
From: Zhang Boyang <zhangboyang...@gmail.com>
Date: Sat, 28 May 2022 16:39:23 +0800
Subject: [PATCH] Fix rightmost pixel of each line not cleared by
 bogl_vga16_text()

The bogl_vga16_clear() function use [x1, x2) as clear range, so there is
no need to minus x2 by 1.
---
 bogl-vga16.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bogl-vga16.c b/bogl-vga16.c
index 6c2cbcf..3fcbe51 100644
--- a/bogl-vga16.c
+++ b/bogl-vga16.c
@@ -373,7 +373,7 @@ bogl_vga16_text (int xx, int yy, const char *s, int n, int fg, int bg, int ul,
     {
       int x2 = xx + bogl_metrics (s, n, font);
       if (x2 >= bogl_xres)
-	x2 = bogl_xres - 1;
+	x2 = bogl_xres;
       
       bogl_vga16_clear (xx, yy, x2, yy + h, bg);
     }
-- 
2.30.2

Reply via email to