diff --git a/src/USER-MISC/fix_bond_react.cpp b/src/USER-MISC/fix_bond_react.cpp index 09f97be7c4..c72a1b027b 100644 --- a/src/USER-MISC/fix_bond_react.cpp +++ b/src/USER-MISC/fix_bond_react.cpp @@ -265,7 +265,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) : memory->create(landlocked_atoms,max_natoms,nreacts,"bond/react:landlocked_atoms"); for (int j = 0; j < nreacts; j++) - for (int i = 0; i < onemol->natoms; i++) edge[i][j] = 0; + for (int i = 0; i < max_natoms; i++) edge[i][j] = 0; // read all superimpose files afterward for (int i = 0; i < nreacts; i++) {