validate more numbers read from data files through using force->numeric()/force->inumeric() instead of atof()/atoi()
This commit is contained in:
@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user