Author: jkim
Date: Fri Apr 28 16:39:09 2017
New Revision: 317560
URL: https://svnweb.freebsd.org/changeset/base/317560

Log:
  Fix end coordinate of the drawable area of border.  Although the name tr_end
  suggests it is the end coordinate, tr_end.tp_row is width and tr_end.tp_col
  is height of the drawable area in reality.
  
  PR:           202288

Modified:
  head/sys/dev/vt/vt_core.c

Modified: head/sys/dev/vt/vt_core.c
==============================================================================
--- head/sys/dev/vt/vt_core.c   Fri Apr 28 16:16:22 2017        (r317559)
+++ head/sys/dev/vt/vt_core.c   Fri Apr 28 16:39:09 2017        (r317560)
@@ -1161,18 +1161,18 @@ vt_set_border(struct vt_window *vw, term
                for (x = 0; x < vd->vd_width; x++)
                        vd->vd_driver->vd_setpixel(vd, x, y, c);
 
-       for (y = vda->tr_begin.tp_row; y <= vda->tr_end.tp_row; y++) {
+       for (y = vda->tr_begin.tp_row; y < vda->tr_end.tp_row; y++) {
                /* Left bar. */
                for (x = 0; x < vda->tr_begin.tp_col; x++)
                        vd->vd_driver->vd_setpixel(vd, x, y, c);
 
                /* Right bar. */
-               for (x = vda->tr_end.tp_col + 1; x < vd->vd_width; x++)
+               for (x = vda->tr_end.tp_col; x < vd->vd_width; x++)
                        vd->vd_driver->vd_setpixel(vd, x, y, c);
        }
 
        /* Bottom bar. */
-       for (y = vda->tr_end.tp_row + 1; y < vd->vd_height; y++)
+       for (y = vda->tr_end.tp_row; y < vd->vd_height; y++)
                for (x = 0; x < vd->vd_width; x++)
                        vd->vd_driver->vd_setpixel(vd, x, y, c);
 }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to