Skip to content

Commit

Permalink
Merge pull request #2741 from eschnett/patch-7
Browse files Browse the repository at this point in the history
Correct index check
  • Loading branch information
pnorbert authored Jun 2, 2021
2 parents b659e59 + c2872fa commit 48402c9
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 48402c9

Please sign in to comment.