From ca55525283f0a63681fc48457bc92603eb037c50 Mon Sep 17 00:00:00 2001 From: athomps Date: Fri, 18 Sep 2015 21:16:12 +0000 Subject: [PATCH] Fixed problem with read_dump xyz git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14045 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/reader_xyz.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/reader_xyz.cpp b/src/reader_xyz.cpp index 2c18e336cb..3dbd69d41f 100644 --- a/src/reader_xyz.cpp +++ b/src/reader_xyz.cpp @@ -56,6 +56,8 @@ int ReaderXYZ::read_time(bigint &ntimestep) { char *eof = fgets(line,MAXLINE,fp); if (eof == NULL) return 1; + int n = strlen(line); + if (n > 0) line[n-1] = '\0'; // strip newline // first line has to have the number of atoms