Module Name:    src
Committed By:   tsutsui
Date:           Mon Dec  2 13:45:40 UTC 2013

Modified Files:
        src/sys/arch/luna68k/dev: omrasops.c

Log Message:
Fix off by one in copyrows() backward case.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/luna68k/dev/omrasops.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/arch/luna68k/dev/omrasops.c
diff -u src/sys/arch/luna68k/dev/omrasops.c:1.13 src/sys/arch/luna68k/dev/omrasops.c:1.14
--- src/sys/arch/luna68k/dev/omrasops.c:1.13	Fri Jul 20 19:31:53 2012
+++ src/sys/arch/luna68k/dev/omrasops.c	Mon Dec  2 13:45:40 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: omrasops.c,v 1.13 2012/07/20 19:31:53 tsutsui Exp $ */
+/* $NetBSD: omrasops.c,v 1.14 2013/12/02 13:45:40 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: omrasops.c,v 1.13 2012/07/20 19:31:53 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omrasops.c,v 1.14 2013/12/02 13:45:40 tsutsui Exp $");
 
 /*
  * Designed speficically for 'm68k bitorder';
@@ -227,7 +227,7 @@ om_copyrows(void *cookie, int srcrow, in
 	srcy = ri->ri_font->fontheight * srcrow;
 	if (srcrow < dstrow && srcrow + nrows > dstrow) {
 		scanspan = -scanspan;
-		srcy += height;
+		srcy = srcy + height - 1;
 	}
 
 	p = (uint8_t *)ri->ri_bits + srcy * ri->ri_stride;

Reply via email to