Skip to content
Permalink
Browse files

Let prefilter read in die instead of continuing with uninitialized data

  • Loading branch information...
elileka committed May 29, 2019
1 parent bf8c5ea commit 0fc960802ec320ef930f3ba1a35b026daa51124d
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/prefiltering/QueryMatcher.h
@@ -112,15 +112,17 @@ class QueryMatcher {
return first_term + mid_term - logScoreFactorial;
}

static hit_t parsePrefilterHit(char* data)
{
static hit_t parsePrefilterHit(char* data) {
hit_t result;
const char *wordCnt[255];
size_t cols = Util::getWordsOfLine(data, wordCnt, 254);
if (cols == 3) {
result.seqId = Util::fast_atoi<unsigned int>(wordCnt[0]);
result.prefScore = Util::fast_atoi<short>(wordCnt[1]);
result.diagonal = static_cast<unsigned short>(Util::fast_atoi<short>(wordCnt[2]));
} else {
Debug(Debug::INFO) << "Invalid prefilter input: cols = " << cols << " wordCnt[0]: " << wordCnt[0] << "\n" ;
EXIT(EXIT_FAILURE);
}
return result;
}

0 comments on commit 0fc9608

Please sign in to comment.
You can’t perform that action at this time.