anymore1113 / superobject

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

integer overflow exception when overflow #22

Open GoogleCodeExporter opened 9 years ago

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

Original issue reported on code.google.com by hello...@googlemail.com on 2 Dec 2011 at 7:22