diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 41c16275eb..ea9161b4e3 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -418,6 +418,7 @@ void FixPropertyAtom::grow_arrays(int nmax) } else if (style[m] == CHARGE) { memory->grow(atom->q,nmax,"atom:q"); size_t nbytes = (nmax-nmax_old) * sizeof(double); + memset(&atom->q[nmax_old],0,nbytes); } else if (style[m] == RMASS) { memory->grow(atom->rmass,nmax,"atom:rmass"); size_t nbytes = (nmax-nmax_old) * sizeof(double);