Fixes #961 - Shake reports wrong error
[alexxy/gromacs.git] / src / mdlib / shakef.c
index f6fd555c4ead46f2c4d9b0665462c46f67bfa916..7f003fe670973bc10d0704008fe898334425aa1a 100644 (file)
@@ -150,7 +150,7 @@ void cshake(atom_id iatom[],int ncon,int *nnit,int maxnit,
           rrpr    = rijx*tx+rijy*ty+rijz*tz;
        
           if (rrpr < toler*mytol) 
-              error=ll;
+              error=ll+1;
           else {
               acor      = omega*diff*m2[ll]/rrpr;
               lagr[ll] += acor;