lcl: Patch to avoid range check errors in graphtype.pp (from C Western issue #0011064)

git-svn-id: trunk@14692 -
This commit is contained in:
paul 2008-03-31 00:49:42 +00:00
parent 564ac357d7
commit 65d8d6bfdc

View File

@ -420,8 +420,8 @@ begin
P := DstRowPtr; P := DstRowPtr;
for x := 0 to RS - 1 do for x := 0 to RS - 1 do
begin begin
p^ := (SrcPtr[x] shl ShiftL) or (SrcPtr[x+1] shr ShiftR); P^ := Byte(SrcPtr[x] shl ShiftL) or Byte(SrcPtr[x+1] shr ShiftR);
Inc(p); Inc(P);
end; end;
Inc(SrcPtr, ARowStride); Inc(SrcPtr, ARowStride);
Inc(DstRowPtr, DstRowInc); Inc(DstRowPtr, DstRowInc);
@ -1798,10 +1798,10 @@ begin
//DebugLn(['InternalInit CurShift=',CurShift,' DShift=',DShift]); //DebugLn(['InternalInit CurShift=',CurShift,' DShift=',DShift]);
if CurShift >= DShift then if CurShift >= DShift then
MissingBits[Prec, HighValue] := MissingBits[Prec, HighValue] :=
MissingBits[Prec, HighValue] or (Bits shl (CurShift - DShift)) word(MissingBits[Prec, HighValue] or (Bits shl (CurShift - DShift)))
else else
MissingBits[Prec, HighValue] := MissingBits[Prec, HighValue] :=
MissingBits[Prec, HighValue] or (Bits shr (DShift - CurShift)); word(MissingBits[Prec, HighValue] or (Bits shr (DShift - CurShift)));
Dec(CurShift, DShift); Dec(CurShift, DShift);
end; end;
end; end;