This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: BigInteger(byte[]) constructor bugfix.


On Sun, 1 Apr 2001, Mark J. Roberts wrote:

>   private static int[] byteArrayToIntArray(byte[] bytes, int sign)
>   {
>     // Determine number of words needed.
>     int[] words = new int[(bytes.length + 3) / 4 + 1];
>     int nwords = words.length;
>
>     // For simplicity, tack on an extra word of sign at the front,
>     // it will be canonicalized out later. */
>     if ((bytes.length % 4) != 0) words[--nwords] = sign;

Err, sorry -- the above inserted if statement was our first fix for this
problem, but later the whole line seemed superfluous. My bad.


-- 
Satan, oscillate my metallic sonatas!
Mark Roberts | mjr@statesmean.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]