Skip to content

Commit

Permalink
buffer,errors: add missing n literal in range error string
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cactysman authored and targos committed May 1, 2021
1 parent 885ed96 commit 0544410
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/buffer.js
Expand Up @@ -60,8 +60,8 @@ function checkInt(value, min, max, buf, offset, byteLength) {
if (min === 0 || min === 0n) {
range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;
} else {
range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +
`${(byteLength + 1) * 8 - 1}${n}`;
range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and ` +
`< 2${n} ** ${(byteLength + 1) * 8 - 1}${n}`;
}
} else {
range = `>= ${min}${n} and <= ${max}${n}`;
Expand Down

0 comments on commit 0544410

Please sign in to comment.