From 43b319a22cb17484be8d5129cf88c724332126bd Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 28 Jan 2005 20:33:59 +0000 Subject: [PATCH] * correctly calculate UnusedBitsAtEnd if there are no unused bits to prevent overflow git-svn-id: trunk@6713 - --- lcl/graphtype.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lcl/graphtype.pp b/lcl/graphtype.pp index 6cbe9440a8..c546462061 100644 --- a/lcl/graphtype.pp +++ b/lcl/graphtype.pp @@ -267,7 +267,7 @@ begin if (BitsPerLine and 7)=0 then begin // byte boundary UsedBytesPerLine:=UsedBitsPerLine shr 3; - UnusedBitsAtEnd:=8-(UsedBitsPerLine and 7); + UnusedBitsAtEnd:=(8-(UsedBitsPerLine and 7)) and 7; UnusedByteMask:=($ff00 shr UnusedBitsAtEnd) and $ff; p:=RawImage^.Mask; for y:=0 to Height-1 do begin @@ -775,6 +775,10 @@ end. { ============================================================================= $Log$ + Revision 1.36 2005/01/28 20:33:59 peter + * correctly calculate UnusedBitsAtEnd if there are no unused bits + to prevent overflow + Revision 1.35 2005/01/17 11:53:39 mattias added showing all four sides to AnchorEditor