Fix segfault on very large files, #5170

This commit is contained in:
heckflosse 2019-02-11 20:35:52 +01:00
parent 9802feee86
commit 1813d880d0

View File

@ -5376,7 +5376,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double
histogram.getSumAndAverage (sum, ave);
//find median of luminance
int median = 0, count = histogram[0];
size_t median = 0, count = histogram[0];
while (count < sum / 2) {
median++;