Skip to content

Commit

Permalink
Per #1575, update subset_pairs_mpr_thresh() to make sure the StringAr…
Browse files Browse the repository at this point in the history
…ray and ThreshArray lengths are the same.
  • Loading branch information
JohnHalleyGotway committed Mar 30, 2021
1 parent 27c257f commit b228eed
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions met/src/libcode/vx_statistics/pair_data_point.cc
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,16 @@ PairDataPoint PairDataPoint::subset_pairs_mpr_thresh(
return(*this);
}

// Check for constant length
if(sa.n() != ta.n()) {
mlog << Error << "\nPairDataPoint::subset_pairs_mpr_thresh() -> "
<< "the \"" << conf_key_mpr_column << "\" ("
<< write_css(sa) << ") and \"" << conf_key_mpr_thresh
<< "\" (" << write_css(ta)
<< ") config file entries must have the same length!\n\n";
exit(1);
}

int i;
PairDataPoint out_pd;

Expand Down Expand Up @@ -869,10 +879,10 @@ void VxPairDataPoint::set_mpr_thresh(const StringArray &sa, const ThreshArray &t
// Check for constant length
if(sa.n() != ta.n()) {
mlog << Error << "\nVxPairDataPoint::set_mpr_thresh() -> "
<< "the \"" << conf_key_mpr_column << "\" matched pair column array ("
<< "the \"" << conf_key_mpr_column << "\" ("
<< write_css(sa) << ") and \"" << conf_key_mpr_thresh
<< "\" threshold array (" << write_css(ta)
<< ") must have the same length!\n\n";
<< "\" (" << write_css(ta)
<< ") config file entries must have the same length!\n\n";
exit(1);
}

Expand Down

0 comments on commit b228eed

Please sign in to comment.