util: minor.
This commit is contained in:
parent
faabd36f9e
commit
5513563892
@ -865,7 +865,10 @@ util.fromFixed = function fromFixed(str, exp) {
|
||||
while (lo.length < exp)
|
||||
lo += '0';
|
||||
|
||||
assert(/^\d*$/.test(hi) && /^\d*$/.test(lo),
|
||||
if (lo.length === 0)
|
||||
lo = '0';
|
||||
|
||||
assert(/^\d+$/.test(hi) && /^\d+$/.test(lo),
|
||||
'Non-numeric characters in fixed number string.');
|
||||
|
||||
hi = parseInt(hi, 10);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user