From da7776f818b85073b9fd8214882e687b263519f8 Mon Sep 17 00:00:00 2001 From: Julien Devemy Date: Thu, 14 Sep 2017 11:00:55 +0200 Subject: [PATCH] Bugfix for the limit keyword --- src/compute_chunk_atom.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index f1052bb85a..dcfd2ff131 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -218,10 +218,10 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : if (limit && !compress) limitfirst = 1; iarg += 2; if (limit) { - if (iarg+1 > narg) + if (iarg > narg) error->all(FLERR,"Illegal compute chunk/atom command"); - if (strcmp(arg[iarg+1],"max") == 0) limitstyle = LIMITMAX; - else if (strcmp(arg[iarg+1],"exact") == 0) limitstyle = LIMITEXACT; + if (strcmp(arg[iarg],"max") == 0) limitstyle = LIMITMAX; + else if (strcmp(arg[iarg],"exact") == 0) limitstyle = LIMITEXACT; else error->all(FLERR,"Illegal compute chunk/atom command"); iarg++; }