This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: BigInteger(byte[]) constructor bugfix.
- To: "Mark J. Roberts" <mjr at statesmean dot com>
- Subject: Re: BigInteger(byte[]) constructor bugfix.
- From: Warren Levy <warrenl at redhat dot com>
- Date: Wed, 4 Apr 2001 20:20:19 -0700 (PDT)
- cc: Tom Tromey <tromey at redhat dot com>, java at gcc dot gnu dot org
Thanks Mark, I've got it on my to-do list to take care of getting the
patch in and verifying no regressions were introduced. I hope to get to
it in the next week or so.
--warrenl
On Sun, 1 Apr 2001, Mark J. Roberts wrote:
> On 1 Apr 2001, Tom Tromey wrote:
>
> > >>>>> "Mark" == Mark J Roberts <mjr@statesmean.com> writes:
> >
> > Could you send the output of `diff -u' between the current cvs version
> > and your fixed version? If you are using the cvs checkout out can use
> > `cvs diff -u' to get this. That would be easiest...
>
> mjr::math$ cvs diff -u BigInteger.java
> Index: BigInteger.java
> ===================================================================
> RCS file: /cvs/gcc/gcc/libjava/java/math/BigInteger.java,v
> retrieving revision 1.10.4.1
> diff -u -r1.10.4.1 BigInteger.java
> --- BigInteger.java 2001/03/03 07:27:59 1.10.4.1
> +++ BigInteger.java 2001/04/02 00:05:33
> @@ -220,12 +220,8 @@
> private static int[] byteArrayToIntArray(byte[] bytes, int sign)
> {
> // Determine number of words needed.
> - int[] words = new int[(bytes.length + 3) / 4 + 1];
> + int[] words = new int[bytes.length/4 + 1];
> int nwords = words.length;
> -
> - // For simplicity, tack on an extra word of sign at the front,
> - // it will be canonicalized out later. */
> - words[--nwords] = sign;
>
> // Create a int out of modulo 4 high order bytes.
> int bptr = 0;