jdk/src/share/classes/java/math/BigInteger.java
changeset 19585 b57abf89019f
parent 19061 d48848ef5670
child 20756 d998355e6a5c
--- a/jdk/src/share/classes/java/math/BigInteger.java	Fri Aug 23 20:59:34 2013 +0200
+++ b/jdk/src/share/classes/java/math/BigInteger.java	Fri Aug 23 14:15:54 2013 -0700
@@ -2109,7 +2109,7 @@
         // This is a quick way to approximate the size of the result,
         // similar to doing log2[n] * exponent.  This will give an upper bound
         // of how big the result can be, and which algorithm to use.
-        int scaleFactor = remainingBits * exponent;
+        long scaleFactor = (long)remainingBits * exponent;
 
         // Use slightly different algorithms for small and large operands.
         // See if the result will safely fit into a long. (Largest 2^63-1)