Merge release-5-0 into master
[alexxy/gromacs.git] / src / gromacs / fileio / mdoutf.c
index 5503deff70440748c8d57187929c25057ddd0b68..bf596d1802461d7a2f9b6bf50ef9c8eaff2d7b9f 100644 (file)
@@ -342,7 +342,7 @@ void mdoutf_write_to_trajectory_files(FILE *fplog, t_commrec *cr,
                 int i, j;
 
                 snew(xxtc, of->natoms_x_compressed);
-                for (i = 0, j = 0; (i < of->natoms_x_compressed); i++)
+                for (i = 0, j = 0; (i < of->natoms_global); i++)
                 {
                     if (ggrpnr(of->groups, egcCompressedX, i) == 0)
                     {