Topic: missed range check

function TSqlitePassAnsiStringList.Get(Index: Integer): AnsiString;
begin
  Result := FList^[Index].FString;
end;

procedure TSqlitePassAnsiStringList.Put(Index: Integer; const S: AnsiString);
begin
  FList^[Index].FString := S;
end;

function TSqlitePassWideStringList.Get(Index: Integer): UTF16WideString;
begin
  Result := FList^[Index].FWideString;
end;

procedure TSqlitePassWideStringList.Put(Index: Integer; const S: UTF16WideString);
begin
  FList^[Index].FWideString := S;
end;

---------------
I'am add this line:
  if (Index < 0) or (Index >= FCount) then Error(SListIndexError, Index);

Re: missed range check

Hi,

You are right : This code is the default behavior for TList.

I voluntuary removed this check from the TSqlitePassWideStringList implementation to get a small speed gain.

It shouldn't be necessary to add this because the TSqlitePassWideStringList is directly managed by the TSqlitePassRecordset and shouldn't be used in another way.

Regards