Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0544410

Browse files
cactysmantargos
authored andcommittedMay 1, 2021
buffer,errors: add missing n literal in range error string
PR-URL: #37750 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Pooja D P <Pooja.D.P@ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 885ed96 commit 0544410

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/internal/buffer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ function checkInt(value, min, max, buf, offset, byteLength) {
6060
if (min === 0 || min === 0n) {
6161
range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;
6262
} else {
63-
range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +
64-
`${(byteLength + 1) * 8 - 1}${n}`;
63+
range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and ` +
64+
`< 2${n} ** ${(byteLength + 1) * 8 - 1}${n}`;
6565
}
6666
} else {
6767
range = `>= ${min}${n} and <= ${max}${n}`;

0 commit comments

Comments
 (0)
Please sign in to comment.