diff --git a/imagery/i.atcorr/computations.cpp b/imagery/i.atcorr/computations.cpp index 6e5a38c5b07..aa2a61fa9c5 100644 --- a/imagery/i.atcorr/computations.cpp +++ b/imagery/i.atcorr/computations.cpp @@ -111,7 +111,8 @@ double trunca() break; kk = i; } - + if (kk < 0) + kk = 0; double aa = (double)((log10(sixs_trunc.pha[kk]) - log10(sixs_trunc.pha[k])) / (acos(rmu[kk]) - acos(rmu[k])));