Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/rasops Reset 'height' before underlining in rasops32...



details:   https://anonhg.NetBSD.org/src/rev/7f57d0c15a93
branches:  trunk
changeset: 997270:7f57d0c15a93
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Fri Mar 01 23:14:13 2019 +0000

description:
Reset 'height' before underlining in rasops32_putchar_aa().

Prevents segfault when underlining whitespace in the upper left cell.

diffstat:

 sys/dev/rasops/rasops32.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 8ad4c21464a6 -r 7f57d0c15a93 sys/dev/rasops/rasops32.c
--- a/sys/dev/rasops/rasops32.c Fri Mar 01 17:02:21 2019 +0000
+++ b/sys/dev/rasops/rasops32.c Fri Mar 01 23:14:13 2019 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rasops32.c,v 1.29 2013/09/15 09:39:47 martin Exp $    */
+/*      $NetBSD: rasops32.c,v 1.30 2019/03/01 23:14:13 jakllsch Exp $  */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops32.c,v 1.29 2013/09/15 09:39:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops32.c,v 1.30 2019/03/01 23:14:13 jakllsch Exp $");
 
 #include "opt_rasops.h"
 
@@ -237,6 +237,7 @@
        /* Do underline */
        if ((attr & 1) != 0) {
                rp = (uint32_t *)rrp;                         
+               height = font->fontheight;
                DELTA(rp, (ri->ri_stride * (height - 2)), int32_t *);
                while (width--)
                        *rp++ = clr[1];



Home | Main Index | Thread Index | Old Index