Skip to content

Commit

Permalink
Added boundary check
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbowe committed Oct 27, 2014
1 parent eb38407 commit 736a5cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kmer.hpp
Expand Up @@ -245,7 +245,8 @@ size_t lcs(const kmer_t & a, const kmer_t & b, size_t k) {

template <typename kmer_t>
size_t node_lcs(const kmer_t & a, const kmer_t & b, size_t k) {
assert(k>0); // Shouldnt be called this way, but we also minus 1 down below...
//assert(k>0); // Shouldnt be called this way, but we also minus 1 down below...
if (k == 0) return 0;
kmer_t x(a);
kmer_t y(b);
// TODO: make position-templated set_nt()
Expand Down

0 comments on commit 736a5cf

Please sign in to comment.