diff options
Diffstat (limited to 'sys/arch/amiga/dev/grf_ul.c')
-rw-r--r-- | sys/arch/amiga/dev/grf_ul.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amiga/dev/grf_ul.c b/sys/arch/amiga/dev/grf_ul.c index 5cc7dfbe856..b456f377a3d 100644 --- a/sys/arch/amiga/dev/grf_ul.c +++ b/sys/arch/amiga/dev/grf_ul.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grf_ul.c,v 1.14 2002/03/14 01:26:29 millert Exp $ */ +/* $OpenBSD: grf_ul.c,v 1.15 2002/08/02 16:13:07 millert Exp $ */ /* $NetBSD: grf_ul.c,v 1.24 1997/07/29 17:50:01 veego Exp $ */ #define UL_DEBUG @@ -799,7 +799,7 @@ ul_getcmap (gp, cmap, dev) if (cmap->count == 0 || cmap->index >= mxidx) return 0; - if (cmap->index + cmap->count > mxidx) + if (cmap->count > mxidx - cmap->index) cmap->count = mxidx - cmap->index; /* just copyout from the shadow color map */ @@ -842,7 +842,7 @@ ul_putcmap (gp, cmap, dev) if (cmap->count == 0 || cmap->index >= mxidx) return 0; - if (cmap->index + cmap->count > mxidx) + if (cmap->count > mxidx - cmap->index) cmap->count = mxidx - cmap->index; /* first copyin to our shadow color map */ |