summaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2009-09-29 22:30:14 -0700
committerJesse Wilson <jessewilson@google.com>2009-09-29 22:30:14 -0700
commit5da0b8723f83a4ae17863f211b1e34148f1964d2 (patch)
tree8deb124b1a06b7622a32bfb7f6394bbd8839deb7 /math
parentcbb67b37b1a0223097763f84ebae072eca183164 (diff)
downloadlibcore-5da0b8723f83a4ae17863f211b1e34148f1964d2.zip
libcore-5da0b8723f83a4ae17863f211b1e34148f1964d2.tar.gz
libcore-5da0b8723f83a4ae17863f211b1e34148f1964d2.tar.bz2
Fix BigInteger math bugs.
This initializes the internal representation before doing left shifts. I'd originally missed this in the first Harmony update; change 20002.
Diffstat (limited to 'math')
-rw-r--r--math/src/main/java/java/math/BitLevel.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/math/src/main/java/java/math/BitLevel.java b/math/src/main/java/java/math/BitLevel.java
index 8f3508d..22a486c 100644
--- a/math/src/main/java/java/math/BitLevel.java
+++ b/math/src/main/java/java/math/BitLevel.java
@@ -189,6 +189,9 @@ class BitLevel {
}
static BigInteger shiftLeftOneBit(BigInteger source) {
+ // BEGIN android-added
+ source.establishOldRepresentation("BitLevel.shiftLeftOneBit");
+ // END android-added
int srcLen = source.numberLength;
int resLen = srcLen + 1;
int resDigits[] = new int[resLen];