Bugfix - max would get too big, resulting in out of bounds

accesses.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/physics@10158 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-11-10 11:57:15 +00:00
parent 686c0307a8
commit 1f7d055fa8

View File

@ -99,7 +99,9 @@ void History::updateSaving(float dt)
}
else
{
m_size ++;
// m_size must be m_all_deltas.size() or smaller
if(m_size<(int)m_all_deltas.size())
m_size ++;
}
m_all_deltas[m_current] = dt;