Changeset 129


Ignore:
Timestamp:
May 1, 2018, 3:26:30 PM (2 years ago)
Author:
chronos
Message:
  • Fixed: Range error in random generator for 32-bit architecture.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Protocol.pas

    r120 r129  
    17691769  Temp: LongInt;
    17701770begin
    1771   Temp := LongInt(134775813 * DelphiRandSeed + 1);
    1772   DelphiRandSeed := Temp;
     1771  Temp := LongInt(Int64(134775813) * Int64(DelphiRandSeed) + 1);
     1772  DelphiRandSeed := LongInt(Temp);
    17731773  Result := (UInt64(Cardinal(pi_Max)) * UInt64(Cardinal(Temp))) shr 32;
    17741774end;
Note: See TracChangeset for help on using the changeset viewer.