check size before copy

This commit is contained in:
conrad
2022-09-16 12:49:07 +10:00
parent 70fd84aaf6
commit b9518337ea
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -362,7 +362,7 @@ Col<eT>::operator=(const std::initializer_list<eT>& list)
(*this).set_size(N,1);
arrayops::copy( (*this).memptr(), list.begin(), N );
if(N > 0) { arrayops::copy( (*this).memptr(), list.begin(), N ); }
return *this;
}
+1 -1
View File
@@ -362,7 +362,7 @@ Row<eT>::operator=(const std::initializer_list<eT>& list)
(*this).set_size(1, N);
arrayops::copy( (*this).memptr(), list.begin(), N );
if(N > 0) { arrayops::copy( (*this).memptr(), list.begin(), N ); }
return *this;
}