validate more numbers read from data files through using force->numeric()/force->inumeric() instead of atof()/atoi()

This commit is contained in:
Axel Kohlmeyer
2019-07-07 15:52:21 -04:00
parent b727f0b126
commit 15e1b39531
34 changed files with 247 additions and 247 deletions

View File

@ -612,7 +612,7 @@ void AtomVecAtomic::data_atom(double *coord, imageint imagetmp, char **values)
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
type[nlocal] = atoi(values[1]);
type[nlocal] = force->inumeric(FLERR,values[1]);
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");