Author: bde
Date: Fri Apr 26 13:04:10 2019
New Revision: 346743
URL: https://svnweb.freebsd.org/changeset/base/346743

Log:
  Fix an off-by-1 error for copying overlapping bitmaps in r346416.  For
  nonzero height, the first line in the original order was not copied, and
  for zero height, garbage lines before the first were copied until a crash
  occurred.

Modified:
  head/lib/libvgl/bitmap.c

Modified: head/lib/libvgl/bitmap.c
==============================================================================
--- head/lib/libvgl/bitmap.c    Fri Apr 26 13:00:25 2019        (r346742)
+++ head/lib/libvgl/bitmap.c    Fri Apr 26 13:04:10 2019        (r346743)
@@ -207,7 +207,7 @@ __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
   yextra = 0;
   ystep = 1;
   if (src->Bitmap == dst->Bitmap && srcy < dsty) {
-    yend = srcy;
+    yend = srcy - 1;
     yextra = hight - 1;
     ystep = -1;
   }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to