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:
parent
722f733b1d
commit
382d03d2b8
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user