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 danielleadams committed May 8, 2021
1 parent 581a083 commit efaab98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/buffer.js
Original file line number Diff line number Diff line change
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 efaab98

Please sign in to comment.