Segfault in before/after mode, fixes #5529

This commit is contained in:
Ingo Weyrich
2019-11-17 13:58:43 +01:00
parent f041573d4d
commit 4c99d3b78b
3 changed files with 3 additions and 2 deletions

View File

@@ -272,7 +272,7 @@ template<typename T> void wavelet_level<T>::SynthesisFilterHaarVertical (const T
#pragma omp for nowait
#endif
for(int i = 0; i < skip; i++)
for(int i = 0; i < std::min(skip, height); i++)
{
for(int j = 0; j < width; j++) {
dst[width * i + j] = (srcLo[i * width + j] + srcHi[i * width + j]);