Skip to content

Commit

Permalink
Fixes bug introduced in 235bd27.
Browse files Browse the repository at this point in the history
The bug is causing vtkExodusIIReader::GetNumberOfTimeSteps() reports an incorect value for files with a single timestep.

Bug: http://www.vtk.org/Bug/view.php?id=16738
(closes #16738)
  • Loading branch information
aeslaughter committed Jun 3, 2016
1 parent 97d3517 commit 62bf406
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IO/Exodus/vtkExodusIIReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3845,11 +3845,11 @@ int vtkExodusIIReaderPrivate::UpdateTimeInformation()
num_timesteps = itmp[0];

this->Times.clear();
this->Times.resize( num_timesteps );
// If there are zero or one timesteps, then there is only one file containing
// the data to be read. So, we treat both instances in the same manner.
if ( num_timesteps > 1 )
{
this->Times.resize( num_timesteps );
VTK_EXO_FUNC( ex_get_all_times( this->Exoid, &this->Times[0] ), "Could not retrieve time values." );
}
return 0;
Expand Down

0 comments on commit 62bf406

Please sign in to comment.