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.


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;


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