Fix buffer size calculation in Number.prototype.toString()

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
This commit is contained in:
Dániel Bátyai
2015-07-22 15:06:50 +02:00
committed by Peter Gal
parent fec5933a3d
commit b11007055d
2 changed files with 30 additions and 23 deletions
@@ -41,6 +41,8 @@ assert((-0.03125).toString(2) === "-0.00001");
assert((-0.03125).toString(16) === "-0.08");
assert((-0.0001).toString(4) === "-0.000000122031232023223013010030231")
assert((-0).toString(16) === "0");
assert((1e+73).toString(35) === "2nx1mg1l0w4ujlpt449c5qfrkkmtpgpsfsc2prlaqtnjbli2")
assert((-1e+73).toString(35) === "-2nx1mg1l0w4ujlpt449c5qfrkkmtpgpsfsc2prlaqtnjbli2")
assert((123400).toString(2) === "11110001000001000");
assert((123400).toString(3) === "20021021101");