diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 52d757560..3cbe76f39 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1196,7 +1196,7 @@ fclose(f);*/ //find average luminance for (int i=0; ilog(imax+1)/log2(2)) { octile[7]=1.5*octile[6]-0.5*octile[5]; } + for(int i=1; i<8; i++) { + if (octile[i] == 0.0) + octile[i] = octile[i-1]; + } // compute weighted average separation of octiles // for future use in contrast setting for (int i=1; i<6; i++) {