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.
This commit is contained in:
Bruce Evans 2019-04-26 13:04:10 +00:00
parent 5803d72f7e
commit 7181920238

View File

@ -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;
}