diff --git a/src/containers/List.h b/src/containers/List.h index 2af3b76e..410e1746 100644 --- a/src/containers/List.h +++ b/src/containers/List.h @@ -273,7 +273,7 @@ class List { // Move the elements to fill in the empty slot char* dest = static_cast(mBuffer) + index * sizeof(T); char* src = dest + sizeof(T); - std::memcpy(static_cast(dest), static_cast(src), (mSize - index) * sizeof(T)); + std::memmove(static_cast(dest), static_cast(src), (mSize - index) * sizeof(T)); } // Return an iterator pointing to the element after the removed one