Fix crash in histogram matching #5249

Patch by Alberto
https://github.com/Beep6581/RawTherapee/issues/5249#issuecomment-477923928
This commit is contained in:
Morgan Hardwood 2019-04-03 10:14:49 +02:00
parent 977af213b9
commit d4f0a9a19b

View File

@ -109,7 +109,7 @@ void mappingToCurve(const std::vector<int> &mapping, std::vector<double> &curve)
}
}
if (idx == int(mapping.size())) {
for (idx = 1; idx < int(mapping.size()); ++idx) {
for (idx = 1; idx < int(mapping.size())-1; ++idx) {
if (mapping[idx] >= idx) {
break;
}