diff --git a/src/fix_ave_chunk.cpp b/src/fix_ave_chunk.cpp index dd3d69fac3..6c0951597f 100644 --- a/src/fix_ave_chunk.cpp +++ b/src/fix_ave_chunk.cpp @@ -75,7 +75,7 @@ FixAveChunk::FixAveChunk(LAMMPS *lmp, int narg, char **arg) : nvalues = 0; int iarg = 0; - while (iarg < narg) { + while (iarg < nargnew) { ids[nvalues] = NULL;