Skip to content

Commit

Permalink
Fixed accession loading bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbuchfink committed Nov 19, 2019
1 parent 9becd49 commit df33016
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[0.9.29]
- Fixed a bug that could cause taxonomy features to function incorrectly, affecting versions 0.9.27 and 0.9.28.

[0.9.28]
- Fixed a bug that could cause alignment score overflows for scores > 65535 in frameshift alignment mode.
- Fixed a clang compiler error.
Expand Down
5 changes: 3 additions & 2 deletions src/data/taxonomy.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct Taxonomy
if (l > max_accesion_len)
throw AccessionLengthError();
std::copy(s, s + l, this->s);
std::fill(this->s + l, this->s + max_accesion_len, '\0');
}
Accession(const std::string &s)
{
Expand All @@ -58,8 +59,8 @@ struct Taxonomy
//this->s[0] = 0;
throw AccessionLengthError();
}
else
std::copy(t.c_str(), t.c_str() + t.length(), this->s);
std::copy(t.c_str(), t.c_str() + t.length(), this->s);
std::fill(this->s + t.length(), this->s + max_accesion_len, '\0');
}
bool operator<(const Accession &y) const
{
Expand Down

0 comments on commit df33016

Please sign in to comment.