mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 18:09:23 +02:00
fix one range check error, formatting
git-svn-id: trunk@14251 -
This commit is contained in:
parent
85e93e8f14
commit
7b7eafc985
@ -194,7 +194,7 @@ class procedure TWin32WSCustomImageList.AddData(AListHandle: TLCLIntfHandle; ACo
|
|||||||
P^ := (P^ and $FE) or ((not AData^.Alpha) shr 7);
|
P^ := (P^ and $FE) or ((not AData^.Alpha) shr 7);
|
||||||
if x and $7 = 0
|
if x and $7 = 0
|
||||||
then Inc(p)
|
then Inc(p)
|
||||||
else P^ := P^ shl 1;
|
else P^ := Byte(P^ shl 1);
|
||||||
Inc(AData);
|
Inc(AData);
|
||||||
end;
|
end;
|
||||||
// finish mask shifting
|
// finish mask shifting
|
||||||
|
@ -271,12 +271,12 @@ begin
|
|||||||
Result := Len;
|
Result := Len;
|
||||||
// use the last 30 characters to compute the hash
|
// use the last 30 characters to compute the hash
|
||||||
case fCaseSensitive of
|
case fCaseSensitive of
|
||||||
True:
|
True:
|
||||||
for I:= Len -1 downto 0 do
|
for I := Len - 1 downto 0 do
|
||||||
inc(Result, cardinal(ord(P[I])) shl I);
|
inc(Result, cardinal(ord(P[I])) shl I);
|
||||||
False:
|
False:
|
||||||
for I:= Len -1 downto 0 do
|
for I := Len - 1 downto 0 do
|
||||||
inc(Result, cardinal(ord(UpperCaseChars[P[I]])) shl I);
|
inc(Result, cardinal(ord(UpperCaseChars[P[I]])) shl I);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user