Skip to content
This repository
Browse code

add assertion to fix crash in the case that a string is not in the index

commit 506acff029b9002442e4de4456abda90e287d855 1 parent cb14cf6
Jared Simpson authored

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  src/Algorithm/QCProcess.cpp
1  src/Algorithm/QCProcess.cpp
@@ -230,6 +230,7 @@ DuplicateCheckResult QCProcess::performDuplicateCheck(const SequenceWorkItem& wo
230 230
231 231 // Calculate the canonical index for this string - the lowest
232 232 // value in the two lexicographic index
  233 + assert(fwdIntervals.interval[0].isValid() || rcIntervals.interval[0].isValid());
233 234 int64_t fi = fwdIntervals.interval[0].isValid() ? fwdIntervals.interval[0].lower : std::numeric_limits<int64_t>::max();
234 235 int64_t ri = rcIntervals.interval[0].isValid() ? rcIntervals.interval[0].lower : std::numeric_limits<int64_t>::max();
235 236 int64_t canonicalIdx = std::min(fi, ri);

0 comments on commit 506acff

Please sign in to comment.
Something went wrong with that request. Please try again.