1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

This needs to be a memmove as the areas may overlap.

This commit is contained in:
Thomas Harte 2017-01-29 16:12:48 -05:00
parent 7fd02e7f4c
commit ebde955356

View File

@ -130,7 +130,7 @@ void ArrayBuilder::Buffer::flush()
{ {
if(submitted_data) if(submitted_data)
{ {
memcpy(data.data(), &data[submitted_data], allocated_data - submitted_data); memmove(data.data(), &data[submitted_data], allocated_data - submitted_data);
allocated_data -= submitted_data; allocated_data -= submitted_data;
flushed_data -= submitted_data; flushed_data -= submitted_data;
submitted_data = 0; submitted_data = 0;