Skip to content

Commit

Permalink
Fix error on lookup of module index
Browse files Browse the repository at this point in the history
  • Loading branch information
sfegan committed Sep 24, 2024
1 parent 97a57fc commit 931c101
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iact_data/nectarcam_acada_event_decoder_r1v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ bool NectarCam_ACADACameraEventDecoder_R1v1::decode(
{
const auto* mod_data_struct = reinterpret_cast<const NectarCountersWithTriggerPattern*>(mod_data_string);

if(imod < static_cast<unsigned>(calin_event->module_index_size()) and
if(imod >= static_cast<unsigned>(calin_event->module_index_size()) or
calin_event->module_index(imod) == -1)continue;

auto* module_counters = calin_event->add_module_counter();
Expand Down

0 comments on commit 931c101

Please sign in to comment.