BigInteger.java (byteArrayToIntArray): Don't include extraneous/malformed sign word.
2001-06-19 Mark J. Roberts <mjr@statesmean.com> * java/math/BigInteger.java (byteArrayToIntArray): Don't include extraneous/malformed sign word. From-SVN: r43455
This commit is contained in:
parent
57dadce202
commit
a0d4ddde2c
2 changed files with 6 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2001-06-19 Mark J. Roberts <mjr@statesmean.com>
|
||||||
|
|
||||||
|
* java/math/BigInteger.java (byteArrayToIntArray): Don't include
|
||||||
|
extraneous/malformed sign word.
|
||||||
|
|
||||||
2001-06-15 Tom Tromey <tromey@redhat.com>
|
2001-06-15 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* jni.cc (_Jv_JNI_NewLocalRef): Search other frames.
|
* jni.cc (_Jv_JNI_NewLocalRef): Search other frames.
|
||||||
|
|
|
@ -220,13 +220,9 @@ public class BigInteger extends Number implements Comparable
|
||||||
private static int[] byteArrayToIntArray(byte[] bytes, int sign)
|
private static int[] byteArrayToIntArray(byte[] bytes, int sign)
|
||||||
{
|
{
|
||||||
// Determine number of words needed.
|
// 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;
|
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.
|
// Create a int out of modulo 4 high order bytes.
|
||||||
int bptr = 0;
|
int bptr = 0;
|
||||||
int word = sign;
|
int word = sign;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue