Merge release-4-6 into master
[alexxy/gromacs.git] / src / gromacs / gmxlib / confio.c
index 0af17e2bb4d6919f3b5ef0d9e7e9355372f83b46..4167a51b506a428a6ab6a4f457d056a9a3707033 100644 (file)
@@ -1397,7 +1397,7 @@ void read_stx_conf(const char *infile,char *title,t_atoms *atoms,
     read_xyz_conf(infile,title,atoms,x);
     break;
   case efG96:
-    fr.title = title;
+    fr.title  = NULL;
     fr.natoms = atoms->nr;
     fr.atoms = atoms;
     fr.x = x;
@@ -1407,6 +1407,7 @@ void read_stx_conf(const char *infile,char *title,t_atoms *atoms,
     read_g96_conf(in, infile, &fr, g96_line);
     gmx_fio_fclose(in);
     copy_mat(fr.box,box);
+    strncpy(title, fr.title, STRLEN);
     break;
   case efPDB:
   case efBRK: