Skip to content

Commit

Permalink
buffer: Properly apply offset on fast path
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Aug 15, 2024
1 parent ccf05ef commit e708a48
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 e708a48

Please sign in to comment.