aka-demik / superobject

Automatically exported from https://code.google.com/p/superobject/
0 stars 1 forks source link

Delphi 6 Hash function raise EIntOverflow exception #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Running demo VirtualTreeView raise exception.

Change compiler directives to this helped:

class function TSuperAvlEntry.Hash(const k: SOString): Cardinal;
var
  h: cardinal;
  i: Integer;
begin
  h := 0;
{$Q-}
  for i := 1 to Length(k) do
    h := Cardinal( h*129 + ord(k[i]) + $9e370001);
  Result := h;
end;
{$Q+}

Original issue reported on code.google.com by pavol.st...@voxel.sk on 4 Dec 2010 at 12:56