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 <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Pooja D P <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
cactysman authored and aduh95 committed Apr 17, 2021
1 parent e541032 commit 14aed60
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 @@ -63,8 +63,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 14aed60

Please sign in to comment.