Skip to content

Commit 13205d5

Browse files
vsemozhetbytMylesBorins
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 2319bc5 commit 13205d5

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
@@ -1237,7 +1237,7 @@ console.log(b.toString());
12371237

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

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

0 commit comments

Comments
 (0)