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:
bde 2019-04-26 13:04:10 +00:00
parent 722f733b1d
commit 382d03d2b8

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