diff --git a/include/reactphysics3d/containers/Array.h b/include/reactphysics3d/containers/Array.h index b48c8717..6b450256 100755 --- a/include/reactphysics3d/containers/Array.h +++ b/include/reactphysics3d/containers/Array.h @@ -364,8 +364,8 @@ class Array { // Move the elements to fill in the empty slot void* dest = reinterpret_cast(mBuffer + index); - void* src = dest + sizeof(T); - std::memmove(static_cast(dest), static_cast(src), (mSize - index) * sizeof(T)); + std::uintptr_t src = reinterpret_cast(dest) + sizeof(T); + std::memmove(dest, reinterpret_cast(src), (mSize - index) * sizeof(T)); } // Return an iterator pointing to the element after the removed one