Fixed assert regarding wrong clamping of current timestep

p4#: 20802
This commit is contained in:
Jacob Støren
2013-03-07 09:42:34 +01:00
parent 86696d85e5
commit 705bb185e0

View File

@@ -274,7 +274,7 @@ void RimReservoirView::clampCurrentTimestep()
// Clamp the current timestep to actual possibilities
if (this->gridCellResults())
{
if (m_currentTimeStep() > static_cast<int>(this->gridCellResults()->maxTimeStepCount()))
if (m_currentTimeStep() >= static_cast<int>(this->gridCellResults()->maxTimeStepCount()))
{
m_currentTimeStep = static_cast<int>(this->gridCellResults()->maxTimeStepCount()) -1;
}