Skip to content
Snippets Groups Projects
Commit 53fc5c9b authored by Studer Gabriel's avatar Studer Gabriel
Browse files

BUGFIX: FindResidue with a ost.mol.ResNum containing ins code

An ins code in the search ResNum caused a jump to the next residue.
The assertion that should've catched this is optimized away with -O3.
The new behaviour returns an invalid residue if the exact ResNum
(including ins code) is not present in these cases.
parent 447fcbed
Branches
Tags
No related merge requests found
...@@ -409,7 +409,9 @@ int ChainImpl::GetIndexForResNumInSequence(const ResNum& number) const ...@@ -409,7 +409,9 @@ int ChainImpl::GetIndexForResNumInSequence(const ResNum& number) const
if (pos<0 || pos>=static_cast<int>(residue_list_.size())) { if (pos<0 || pos>=static_cast<int>(residue_list_.size())) {
return -1; return -1;
} }
assert(residue_list_[pos]->GetNumber()==number);
if(residue_list_[pos]->GetNumber()!=number) return -1;
return pos; return pos;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment