[fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

Maciej Izak hnb.code at gmail.com
Wed Aug 17 17:25:18 CEST 2016


2016-08-17 17:20 GMT+02:00 Maciej Izak <hnb.code at gmail.com>:

> procedure ExtendedHasher(constref AValue: string; AHashList: PUInt32);
> begin
>   TDefaultHashFactory.GetHashList(Pointer(AValue), Length(AValue) *
> SizeOf(Char), AHashList);
> end;
>

there is bug, correct version:

procedure ExtendedHasher(constref AValue: string; AHashList: PUInt32);
var
  temp: string;
begin
  temp := LowerCase(AValue);
  TDefaultHashFactory.GetHashList(Pointer(temp), Length(temp) *
SizeOf(Char), AHashList);
end;

-- 
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160817/c65a5c24/attachment.html>


More information about the fpc-pascal mailing list