Skip to content

Commit 0c046e8

Browse files
vsemozhetbytaddaleax
authored andcommitted
doc: correct my wrong note about buf.fill()
PR-URL: #25585 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]>
1 parent 58952a1 commit 0c046e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/buffer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ console.log(b.toString());
12401240

12411241
`value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
12421242
integer. If the resulting integer is greater than `255` (decimal), `buf` will be
1243-
filled with `0`.
1243+
filled with `value & 255`.
12441244

12451245
If the final write of a `fill()` operation falls on a multi-byte character,
12461246
then only the bytes of that character that fit into `buf` are written:

0 commit comments

Comments
 (0)