Commit d5af9f6a authored by kraus's avatar kraus

errors about array-bounds are gone with these changes

parent 1399bc57
......@@ -1381,7 +1381,7 @@ orderModes(FMatrix<double, 2 * N, 2 * N> &V, FVector<complex<double>, 2 * N> &mu
}
n_r++;
i++;
} else {
} else if (i + 1 < 2 * N) {
// Collect "stable" modes in lower indices of V.
mu[n_c] = tmu[i];
mu[n_c+1] = tmu[i+1];
......@@ -1405,8 +1405,8 @@ orderModes(FMatrix<double, 2 * N, 2 * N> &V, FVector<complex<double>, 2 * N> &mu
// Order and copy "unstable" modes.
for(int i = 0; i < n_r;) {
int m;
for(m = i + 1; m < n_r; ++m) {
int m = i + 1;
for(; m < n_r && m < 2 * N; ++m) {
if(std::abs(tmu[i] + tmu[m]) < tol) break;
}
......@@ -1493,4 +1493,4 @@ std::ostream &operator<<(std::ostream &os, const DragtFinnMap<N> &map) {
return os;
}
#endif // CLASSIC_DragtFinnMap_HH
#endif // CLASSIC_DragtFinnMap_HH
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment