Module Name:    src
Committed By:   rin
Date:           Fri Aug  9 11:42:03 UTC 2019

Modified Files:
        src/sys/dev/rasops: rasops.c

Log Message:
Fix color range overflow; we cannot make bright colors more brighter.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/rasops/rasops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.118 src/sys/dev/rasops/rasops.c:1.119
--- src/sys/dev/rasops/rasops.c:1.118	Fri Aug  9 11:08:20 2019
+++ src/sys/dev/rasops/rasops.c	Fri Aug  9 11:42:03 2019
@@ -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 <sys/cdefs.h>
-__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
 #endif
 	}
 
-	if ((flg & WSATTR_HILIT) != 0)
+	if ((flg & WSATTR_HILIT) != 0 && fg < 8)
 		fg += 8;
 
 	if ((flg & WSATTR_REVERSE) != 0) {

Reply via email to