diff --git a/modules/seq/base/src/impl/sequence_impl.cc b/modules/seq/base/src/impl/sequence_impl.cc index 5ce66685e0d90e229a93c0a9c02f9cee4fd10a20..941d2c04230c9bbd2a4885e09cf4331d8fc270f1 100644 --- a/modules/seq/base/src/impl/sequence_impl.cc +++ b/modules/seq/base/src/impl/sequence_impl.cc @@ -280,7 +280,7 @@ void SequenceImpl::Replace(const String& str,int start, int end) void SequenceImpl::ShiftRegion(int start, int end, int amount) { - if(start <= end && end + amount > this->GetLength() || start + amount <= 0){ + if(start > end || start + amount <= 0 || end + amount > this->GetLength()){ throw std::out_of_range("Region not valid"); } String str1=seq_string_.substr(start, end-start);