Skip to content

Commit

Permalink
Fix vec::Vector's copy constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
lamphamsy committed Mar 26, 2019
1 parent 8b5e058 commit 136d2a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vec_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Vector<T>::Vector(Vector const& other)
{
if (new_mem) {
this->mem = this->allocator.allocate(other.mem_len);
std::copy_n(this->mem, other.mem_len, other.mem);
std::copy_n(other.mem, other.mem_len, this->mem);
} else {
this->mem = other.mem;
}
Expand Down

0 comments on commit 136d2a7

Please sign in to comment.