[BUG] UInt#parse_number should support zero. Add tests.

This commit is contained in:
Stefan Thomas
2014-04-24 09:00:57 -07:00
parent 5a04ce9629
commit fbdef6eea0
2 changed files with 26 additions and 1 deletions

View File

@@ -234,7 +234,7 @@ UInt.prototype.parse_number = function (j) {
if ("number" === typeof j &&
j === +j &&
j > 0) {
j >= 0) {
// XXX Better, faster way to get BigInteger from JS int?
this._value = new BigInteger(""+j);
}