correctly check for index and dimensionality
This commit is contained in:
@ -56,12 +56,14 @@ ComputeSlice::ComputeSlice(LAMMPS *lmp, int narg, char **arg) :
|
||||
ArgInfo argi(arg[iarg]);
|
||||
|
||||
which[nvalues] = argi.get_type();
|
||||
argindex[nvalues] = argi.get_dim();
|
||||
argindex[nvalues] = argi.get_index1();
|
||||
ids[nvalues] = argi.copy_name();
|
||||
|
||||
if ((which[nvalues] == ArgInfo::UNKNOWN) || (which[nvalues] == ArgInfo::NONE)
|
||||
|| (argindex[nvalues] > 1))
|
||||
|| (argi.get_dim() > 1))
|
||||
error->all(FLERR,"Illegal compute slice command");
|
||||
|
||||
nvalues++;
|
||||
}
|
||||
|
||||
// setup and error check
|
||||
|
||||
Reference in New Issue
Block a user