Module Name:    src
Committed By:   macallan
Date:           Tue Jan  5 05:04:38 UTC 2010

Modified Files:
        src/sys/dev/sbus: zx.c

Log Message:
fix off by one in zx_copyrect()


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/sbus/zx.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/sbus/zx.c
diff -u src/sys/dev/sbus/zx.c:1.34 src/sys/dev/sbus/zx.c:1.35
--- src/sys/dev/sbus/zx.c:1.34	Tue Jan  5 04:17:49 2010
+++ src/sys/dev/sbus/zx.c	Tue Jan  5 05:04:38 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: zx.c,v 1.34 2010/01/05 04:17:49 macallan Exp $	*/
+/*	$NetBSD: zx.c,v 1.35 2010/01/05 05:04:38 macallan Exp $	*/
 
 /*
  *  Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.34 2010/01/05 04:17:49 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.35 2010/01/05 05:04:38 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -862,6 +862,9 @@
 {
 	uint32_t dir;
 
+	w -= 1;
+	h -= 1;
+
 	if (sy < dy || sx < dx) {
 		dir = 0x80000000;
 		sx += w;

Reply via email to