diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index d9ae34150..371ce8a3f 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -52,7 +52,7 @@ struct Parts Parts &operator =(const Parts &other) { - std::copy(other.data.begin(), other.data.begin() + lastActiveIndex + 1, data.begin()); + std::copy(other.data.begin(), other.data.begin() + other.lastActiveIndex + 1, data.begin()); lastActiveIndex = other.lastActiveIndex; return *this; }