fix off-by one bug when looking for bonds.

This commit is contained in:
Axel Kohlmeyer 2016-08-28 14:20:43 -04:00
parent 56d0ab9474
commit fc5db8a737
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ void ComputeCNAAtom::compute_peratom()
for (n = 0; n < ncommon; n++) bonds[n] = 0;
nbonds = 0;
for (jj = 0; jj < ncommon; jj++) {
for (jj = 0; jj < ncommon-1; jj++) {
j = common[jj];
xtmp = x[j][0];
ytmp = x[j][1];