//
// Copyright (c) 2002 Chew Keong TAN
// All rights reserved.
-
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
public BigInteger ()
{
data = new uint [DEFAULT_LEN];
+ this.length = DEFAULT_LEN;
}
#if !INSIDE_CORLIB
/// <param name="rng">A RNG.</param>
public void Randomize (RandomNumberGenerator rng)
{
+ if (this == 0)
+ return;
+
int bits = this.BitCount ();
int dwords = bits >> 5;
int remBits = bits & 0x1F;
r2.Normalize ();
- if (r2 < x) {
+ if (r2 <= x) {
Kernel.MinusEq (x, r2);
} else {
BigInteger val = new BigInteger (Sign.Positive, kPlusOne + 1);