Skip to content

Commit

Permalink
Fix memcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhihao-723 committed Nov 26, 2023
1 parent 5c00d2d commit e60b845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ auto PyDecoderBuffer::populate_read_buffer(Py_ssize_t& num_bytes_read) -> bool {
m_read_buffer_mem_owner = new_buf;
m_read_buffer = new_read_buffer;
} else if (0 < num_unconsumed_bytes) {
memcpy(m_read_buffer.data(), unconsumed_bytes.data(), num_unconsumed_bytes);
memmove(m_read_buffer.data(), unconsumed_bytes.data(), num_unconsumed_bytes);
}
m_num_current_bytes_consumed = 0;
m_buffer_size = num_unconsumed_bytes;
Expand Down

0 comments on commit e60b845

Please sign in to comment.