Skip to content
Snippets Groups Projects
Commit 74a4dbaa authored by stefan's avatar stefan
Browse files

Fixed bounds check for sequenceimpl

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2204 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 336f5fa9
Branches
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment