[WIN32K] Fix off-by-one errors

Spotted by Doug Lyons
CORE-17520
This commit is contained in:
Jérôme Gardou 2021-03-31 09:59:44 +02:00 committed by Jérôme Gardou
parent 998870c5ea
commit 068687e0fd

View file

@ -78,7 +78,7 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
{ {
LONG yDst = DestRect->top + Height; LONG yDst = DestRect->top + Height;
LONG ySrc = bTopToBottom ? LONG ySrc = bTopToBottom ?
SourcePoint->y + RECTL_lGetHeight(DestRect) - Height SourcePoint->y + RECTL_lGetHeight(DestRect) - Height - 1
: SourcePoint->y + Height; : SourcePoint->y + Height;
LONG Width = RECTL_lGetWidth(DestRect); LONG Width = RECTL_lGetWidth(DestRect);
@ -86,7 +86,7 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
{ {
LONG xDst = DestRect->left + Width; LONG xDst = DestRect->left + Width;
LONG xSrc = bLeftToRight ? LONG xSrc = bLeftToRight ?
SourcePoint->x + RECTL_lGetWidth(DestRect) - Width SourcePoint->x + RECTL_lGetWidth(DestRect) - Width - 1
: SourcePoint->x + Width; : SourcePoint->x + Width;
ULONG PixelPut = DIB_1BPP_GetPixel(SourceSurf, xSrc, ySrc); ULONG PixelPut = DIB_1BPP_GetPixel(SourceSurf, xSrc, ySrc);
if (XorBit) if (XorBit)