diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 56999a1955d0a1..11f3795741b3d3 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1085,7 +1085,7 @@ console.log(buf1.compare(buf2, 5, 6, 5)); // Prints: 1 ``` -[`ERR_INDEX_OUT_OF_RANGE`] is thrown if `targetStart < 0`, `sourceStart < 0`, +[`ERR_OUT_OF_RANGE`] is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. ### buf.copy(target[, targetStart[, sourceStart[, sourceEnd]]]) @@ -1197,6 +1197,9 @@ console.log(buf1.equals(buf3)); +A given index was out of the accepted range (e.g. negative offsets). + ### ERR_NAPI_CONS_PROTOTYPE_OBJECT