Commit 44e48901 authored by Jordi Inglada's avatar Jordi Inglada
Browse files

BUG: check upper bound

parent 5be67b95
......@@ -110,7 +110,7 @@ SpectralResponse<TPrecision,TValuePrecision>
unsigned int lambdaPosGuess = static_cast<unsigned int>((lambda - lambdaMin)/(lambdaMax - lambdaMin)*m_Response.size())-1;
for(typename VectorPairType::const_iterator it = beg+lambdaPosGuess; it != last; it++)
for(typename VectorPairType::const_iterator it = beg+lambdaPosGuess; it <= last; it++)
{
// if the guess was too high
if ( (*it).first >= lambda )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment