correctly check for index and dimensionality

This commit is contained in:
Axel Kohlmeyer
2021-01-31 22:13:43 -05:00
parent 99184eb653
commit d5e6bcd9d3
5 changed files with 12 additions and 10 deletions

View File

@ -85,11 +85,11 @@ ComputeReduceChunk::ComputeReduceChunk(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 reduce/chunk command");
nvalues++;