#3 bug in mpFXYVector::GetNextXY()

closed-fixed
cdron77
None
5
2008-08-07
2008-07-16
shang
No

The return value for the last data point is wrong, i.e. the last data point is never plotted.

bool mpFXYVector::GetNextXY(double & x, double & y)
{
if (m_index>=m_xs.size())
return FALSE;
else
{
x = m_xs[m_index];
y = m_ys[m_index++];
return m_index<m_xs.size();
}
}

The last two lines should be
y = m_ys[m_index];
return (m_index++)<m_xs.size();
or
y = m_ys[m_index++];
return m_index<=m_xs.size();

Discussion

  • cdron77
    cdron77
    2008-08-07

    • assigned_to: nobody --> cdron77
    • status: open --> closed-fixed
     
  • cdron77
    cdron77
    2008-08-07

    Logged In: YES
    user_id=1669489
    Originator: NO

    Fixed in Subversion code.