From c9639cda70f902f3f1de70a81952ec959ee6cfdb Mon Sep 17 00:00:00 2001 From: rin Date: Fri, 9 Aug 2019 11:42:03 +0000 Subject: [PATCH] Fix color range overflow; we cannot make bright colors more brighter. --- sys/dev/rasops/rasops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c index 5e0de056920b..7b453fcd96d8 100644 --- a/sys/dev/rasops/rasops.c +++ b/sys/dev/rasops/rasops.c @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.118 2019/08/09 11:08:20 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.119 2019/08/09 11:42:03 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.118 2019/08/09 11:08:20 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.119 2019/08/09 11:42:03 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_rasops.h" @@ -646,7 +646,7 @@ rasops_allocattr_color(void *cookie, int fg0, int bg0, int flg, long *attr) #endif } - if ((flg & WSATTR_HILIT) != 0) + if ((flg & WSATTR_HILIT) != 0 && fg < 8) fg += 8; if ((flg & WSATTR_REVERSE) != 0) {