Skip to content

Commit

Permalink
Tokenizer.next() fix for Illumina#41
Browse files Browse the repository at this point in the history
  • Loading branch information
lgruen committed May 13, 2023
1 parent c4cb6c9 commit ec0253b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/lib/workflow/DualFastq2SamWorkflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ align::InsertSizeParameters DualFastq2SamWorkflow::requestInsertSizeInfo(

align::InsertSizeParameters ret;
bool retDone = false;
while (r1Tokenizer.next() && r2Tokenizer.next()) {
while (true) {
// Always call next() on both tokenizers, to make sure both files are read to the end.
const bool r1Next = r1Tokenizer.next();
const bool r2Next = r2Tokenizer.next();
if (!r1Next || !r2Next) {
break;
}

const auto& r1Token = r1Tokenizer.token();
const auto& r2Token = r2Tokenizer.token();
// std::cout << "token: " << r1Token << "-" << r2Token << "\n";
Expand Down

0 comments on commit ec0253b

Please sign in to comment.