Skip to content

Commit

Permalink
Fix invalid memory read error in rppath
Browse files Browse the repository at this point in the history
This fixes an invalid memory read error in the Sssr::isUnique()
method for the rppath ring perception algrorithm.
  • Loading branch information
kylelutz committed Dec 16, 2011
1 parent b8ba4bd commit 0a2a657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chemkit/moleculargraph_rppath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ bool Sssr::isUnique(const std::vector<int> &path) const
continue;
}

for(unsigned int i = 0; i < ring.size(); i++){
for(unsigned int i = 0; i < ring.size() - 1; i++){
pathBonds.erase(std::make_pair(std::min(ring[i], ring[i+1]),
std::max(ring[i], ring[i+1])));
}
Expand Down

0 comments on commit 0a2a657

Please sign in to comment.