Skip to content

Commit 3ca54aa

Browse files
committed
Added Create(NumBits, TRandom32Proc). No need for an IRandom, or Velthuis.RandomNumbers.
1 parent 7047a14 commit 3ca54aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Velthuis.BigIntegers.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -3164,7 +3164,7 @@ constructor BigInteger.Create(NumBits: Integer; Random: TRandom32Proc);
31643164
end;
31653165

31663166
FSize := (NumBits + CLimbBits - 1) div CLimbBits;
3167-
SetLength(FData, (FSize + CLimbSize - 1) div CLimbSize);
3167+
SetLength(FData, (4 * FSize + 3) div 4);
31683168
for I := 0 to FSize - 1 do
31693169
FData[I] := Random();
31703170

0 commit comments

Comments
 (0)