Skip to content

Commit

Permalink
Correct index check
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett authored Jun 2, 2021
1 parent ab030df commit c2872fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/adios2/core/Variable.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Dims Variable<T>::DoCount() const
const std::vector<typename Variable<T>::BPInfo> blocksInfo =
m_Engine->BlocksInfo<T>(*this, step);

if (m_BlockID > blocksInfo.size())
if (m_BlockID >= blocksInfo.size())
{
throw std::invalid_argument(
"ERROR: blockID " + std::to_string(m_BlockID) +
Expand Down

0 comments on commit c2872fa

Please sign in to comment.