Skip to content

Commit

Permalink
buffer: properly apply offset on fast path
Browse files Browse the repository at this point in the history
PR-URL: #54391
  • Loading branch information
ronag committed Aug 15, 2024
1 parent ccf05ef commit 41c2d89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,7 @@ uint32_t FastWriteString(Local<Value> receiver,

max_length = std::min<uint32_t>(dst.length() - offset, max_length);

memcpy(dst_data, src.data, max_length);
memcpy(dst_data + offset, src.data, max_length);

return max_length;
}
Expand Down

0 comments on commit 41c2d89

Please sign in to comment.