Fix reading of g96 title
authorRoland Schulz <roland@utk.edu>
Fri, 18 Jan 2013 06:25:50 +0000 (01:25 -0500)
committerRoland Schulz <roland@utk.edu>
Fri, 18 Jan 2013 06:32:29 +0000 (01:32 -0500)
Change-Id: I5b077ef2f581d704848b658c588636c7510d3c38

src/gmxlib/confio.c

index 41a509e307acc9d03003ae7a8a45d72b3cba13e7..c612dee5ab5bcb97e3e0c8cc9176fb7205242d3a 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: