Date: Fri, 26 Apr 2019 13:04:10 +0000 (UTC) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346743 - head/lib/libvgl Message-ID: <201904261304.x3QD4AHU075191@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904261304.x3QD4AHU075191>