Skip to content

Commit

Permalink
Check also in case the FirstEventEntry is negative
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Sep 15, 2024
1 parent 6a4d4f9 commit 7073d17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions k4FWCore/components/IOSvc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ StatusCode IOSvc::initialize() {
m_entries = m_reader->getEntries(podio::Category::Event);
}

if (m_entries && m_firstEventEntry >= m_entries) {
error() << "First event entry is larger than the number of entries in the file" << endmsg;
if ((m_entries && m_firstEventEntry >= m_entries) || m_firstEventEntry < 0) {
error() << "First event entry is larger than the number of entries in the file or negative" << endmsg;
return StatusCode::FAILURE;
}

Expand Down

0 comments on commit 7073d17

Please sign in to comment.