mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 14:29:31 +02:00
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:
parent
564ac357d7
commit
65d8d6bfdc
@ -420,8 +420,8 @@ begin
|
||||
P := DstRowPtr;
|
||||
for x := 0 to RS - 1 do
|
||||
begin
|
||||
p^ := (SrcPtr[x] shl ShiftL) or (SrcPtr[x+1] shr ShiftR);
|
||||
Inc(p);
|
||||
P^ := Byte(SrcPtr[x] shl ShiftL) or Byte(SrcPtr[x+1] shr ShiftR);
|
||||
Inc(P);
|
||||
end;
|
||||
Inc(SrcPtr, ARowStride);
|
||||
Inc(DstRowPtr, DstRowInc);
|
||||
@ -1798,10 +1798,10 @@ begin
|
||||
//DebugLn(['InternalInit CurShift=',CurShift,' DShift=',DShift]);
|
||||
if CurShift >= DShift then
|
||||
MissingBits[Prec, HighValue] :=
|
||||
MissingBits[Prec, HighValue] or (Bits shl (CurShift - DShift))
|
||||
word(MissingBits[Prec, HighValue] or (Bits shl (CurShift - DShift)))
|
||||
else
|
||||
MissingBits[Prec, HighValue] :=
|
||||
MissingBits[Prec, HighValue] or (Bits shr (DShift - CurShift));
|
||||
word(MissingBits[Prec, HighValue] or (Bits shr (DShift - CurShift)));
|
||||
Dec(CurShift, DShift);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user