Skip to content

Commit b7f31ca

Browse files
committed
fix(NODE-5546): fix additional rounding bug
1 parent 6a8b8df commit b7f31ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/decimal128.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export class Decimal128 extends BSONValue {
402402
endOfString = endOfString + 1;
403403
}
404404

405-
const roundDigit = parseInt(representation[firstNonZero + lastDigit + 1], 10);
405+
const roundDigit = parseInt(representation[firstNonZero + endOfString + 1], 10);
406406
let roundBit = 0;
407407

408408
if (roundDigit >= 5) {

0 commit comments

Comments
 (0)