Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2017 16:39:09 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r317560 - head/sys/dev/vt
Message-ID:  <201704281639.v3SGd9RL044864@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704281639.v3SGd9RL044864>