diff options
| -rw-r--r-- | libjava/ChangeLog | 5 | ||||
| -rw-r--r-- | libjava/java/math/BigInteger.java | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index bb1463c..6278cb6 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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> * jni.cc (_Jv_JNI_NewLocalRef): Search other frames. diff --git a/libjava/java/math/BigInteger.java b/libjava/java/math/BigInteger.java index 1d848d1..3a99de9 100644 --- a/libjava/java/math/BigInteger.java +++ b/libjava/java/math/BigInteger.java @@ -220,13 +220,9 @@ public class BigInteger extends Number implements Comparable 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; int word = sign; |
