Merge release-5-0 into master
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / calc_verletbuf.c
index 6074ed84dbbe415c5b2b251c5d486809332aea9e..29cd01d86a3cb40c139746c3f6899c079d4023dc 100644 (file)
@@ -268,6 +268,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.