git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13983 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2015-09-02 20:39:55 +00:00
parent 3f79c91279
commit 047be536bc
35 changed files with 236 additions and 104 deletions

View File

@ -141,10 +141,16 @@ bigint ReaderNative::read_header(double box[3][3], int &triclinic,
nwords = atom->count_words(labelline);
char **labels = new char*[nwords];
labels[0] = strtok(labelline," \t\n\r\f");
if (labels[0] == NULL) return 1;
if (labels[0] == NULL) {
delete[] labels;
return 1;
}
for (int m = 1; m < nwords; m++) {
labels[m] = strtok(NULL," \t\n\r\f");
if (labels[m] == NULL) return 1;
if (labels[m] == NULL) {
delete[] labels;
return 1;
}
}
// match each field with a column of per-atom data