Merge branch release-4-6 into release-5-0
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / calc_verletbuf.c
index a96bd0679e12189f7deb961679b78280de87c349..dd3a36d8ebb5f7fa871e73c3703701079cd582ef 100644 (file)
@@ -265,6 +265,8 @@ static void get_vsite_masses(const gmx_moltype_t  *moltype,
                             inv_mass += coeff*coeff/m_aj;
                         }
                         vsite_m[a1] = 1/inv_mass;
+                        /* Correct for loop increment of i */
+                        i += j - 1 - NRAL(ft);
                         break;
                     default:
                         /* Use the mass of the lightest constructing atom.