diff --git a/wdsp/emnr.cpp b/wdsp/emnr.cpp index 6e6660e3a..c07bd22e8 100644 --- a/wdsp/emnr.cpp +++ b/wdsp/emnr.cpp @@ -233,7 +233,7 @@ void EMNR::NP::interpM ( double xlhigh; double frac; - while ((x >= xvals[idx]) && (idx < nvals - 1)) + while ((idx < nvals - 1) && (x >= xvals[idx])) idx++; xllow = log10 (xvals[idx - 1]); diff --git a/wdsp/snba.cpp b/wdsp/snba.cpp index dcd103031..9afb65b04 100644 --- a/wdsp/snba.cpp +++ b/wdsp/snba.cpp @@ -620,7 +620,7 @@ int SNBA::scanFrame( if (nimp > 0) { - while (merit[i] == merit[0] && i < nimp) + while (i < nimp && merit[i] == merit[0]) i++; }