Skip to content

Commit

Permalink
Merge pull request #240 from s4hts/bug-read-id
Browse files Browse the repository at this point in the history
Fixes #239 space at end of id string
  • Loading branch information
samhunter authored Oct 23, 2020
2 parents 438994d + d97e338 commit a17721e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/src/read.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Read {
// split the id into 2 delimited on the first space
size_t pos = 0;
pos = id_orig.find_first_of(fastq_delimiter);
if (pos != std::string::npos){
if (pos != std::string::npos && pos+2 < id_orig.size()){
id = id_orig.substr(0, pos);
// id2 remove the read designation, add back in on write out
id2 = id_orig.substr(pos+2);
Expand Down

0 comments on commit a17721e

Please sign in to comment.