don't seqcomp sequences that are too small
[mussa.git] / alg / sequence_location.cpp
index 704cb89e4469c974b772e684c2ab9daedd368f88..cbce781c520400949f1ea13ac37aad6d8e529a87 100644 (file)
@@ -1,4 +1,6 @@
 #include "alg/sequence_location.hpp"
+
+#include <cstdlib>
     
 SequenceLocation::SequenceLocation(
     const boost::shared_ptr<Sequence> s, 
@@ -67,7 +69,7 @@ void SequenceLocation::setCount(int c)
 
 int SequenceLocation::getCount() const
 {
-  return right - left;
+  return std::max(right - left, 0);
 }
 
 void SequenceLocation::setRight(int r)