Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/pmax/dev Set the colormap index before checking it!



details:   https://anonhg.NetBSD.org/src/rev/8981fca1ab49
branches:  trunk
changeset: 472209:8981fca1ab49
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun Apr 25 04:04:16 1999 +0000

description:
Set the colormap index before checking it!

diffstat:

 sys/arch/pmax/dev/px.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 7df5c5c262ca -r 8981fca1ab49 sys/arch/pmax/dev/px.c
--- a/sys/arch/pmax/dev/px.c    Sun Apr 25 03:20:45 1999 +0000
+++ b/sys/arch/pmax/dev/px.c    Sun Apr 25 04:04:16 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: px.c,v 1.3 1999/04/24 08:01:06 simonb Exp $ */
+/* $NetBSD: px.c,v 1.4 1999/04/25 04:04:16 simonb Exp $ */
 
 /*
  * Copyright (c) 1997 Jonathan Stone <jonathan%NetBSD.org@localhost>
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.3 1999/04/24 08:01:06 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.4 1999/04/25 04:04:16 simonb Exp $");
 
 /*
  * px.c: driver for the DEC TURBOchannel 2D and 3D accelerated framebuffers
@@ -1702,10 +1702,10 @@
                break;
 
        case QIOSETCMAP:
+               i = ((ColorMap *)data)->index;
                if (i < 0 || i > 255)
                        return (-1);
 
-               i = ((ColorMap *)data)->index;
                pxi->pxi_cmap_idx = i;
                pxi->pxi_cmap_cnt = 1;
                i = (i << 1) + i;



Home | Main Index | Thread Index | Old Index