fcl-base: fixed range check error

This commit is contained in:
mattias 2022-06-23 17:38:19 +02:00
parent 8d79dcc0d0
commit ec6f328822
2 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,7 @@
{$endif} {$endif}
{$H+} {$H+}
{$ifdef CLASSESINLINE}{$inline on}{$endif} {$ifdef CLASSESINLINE}{$inline on}{$endif}
{$IFOPT R+}{$DEFINE RangeChecking}{$ENDIF}
unit Contnrs; unit Contnrs;
@ -1928,6 +1929,7 @@ end;
{ Default hash Function } { Default hash Function }
{$IFDEF RangeChecking}{$R-}{$ENDIF}
Function RSHash(const S: string; const TableSize: Longword): Longword; Function RSHash(const S: string; const TableSize: Longword): Longword;
const const
b = 378551; b = 378551;
@ -1945,6 +1947,7 @@ begin
end; end;
Result:=(Result and $7FFFFFFF) mod TableSize; Result:=(Result and $7FFFFFFF) mod TableSize;
end; end;
{$IFDEF RangeChecking}{$R+}{$ENDIF}
{ THTNode } { THTNode }

View File

@ -194,8 +194,6 @@ begin
AddLn('}'); AddLn('}');
end; end;
constructor TPascalCodeGenerator.Create(AOwner: TComponent); constructor TPascalCodeGenerator.Create(AOwner: TComponent);
begin begin
inherited Create(AOwner); inherited Create(AOwner);