What steps will reproduce the problem?
1. Create an instance of BigInteger (for example var foo:BigInteger = new
BigInteger("50"); )
2. Try to retrieve its string value in decimal ( foo.toString(10); )
What is the expected output?
return "50" (as a string)
What do you see instead?
The flash player enters an infinite loop.
What version of the product are you using? On what operating system?
Trunk (revision 28) / Windows
Please provide any additional information below.
I saw this in the source code of com.hurlant.math.BigInteger (line 72) :
public function toString(radix:Number=16):String {
if (s<0) return "-"+negate().toString(radix);
var k:int;
switch (radix) {
case 2: k=1; break;
case 4: k=2; break;
case 8: k=3; break;
case 16: k=4; break;
case 32: k=5; break;
default:
// return toRadix(radix);
}
Why is the default statement (line 82) commented ? (when I uncomment this
line, it works and I have the expected value)
toRadix() is protected and only used in toString(), that means currently
toRadix() is never called...
Original issue reported on code.google.com by jerome.a...@gmail.com on 15 Feb 2010 at 11:34
Original issue reported on code.google.com by
jerome.a...@gmail.com
on 15 Feb 2010 at 11:34