From bca2c4d2456ea2b0796225863799ada0e0d7af3a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 15 Nov 2024 14:26:10 -0500 Subject: [PATCH] add missing initializers --- src/fix_spring_self.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fix_spring_self.cpp b/src/fix_spring_self.cpp index 302dc2d952..797255c381 100644 --- a/src/fix_spring_self.cpp +++ b/src/fix_spring_self.cpp @@ -37,7 +37,7 @@ enum { NONE, CONSTANT, EQUAL, ATOM }; /* ---------------------------------------------------------------------- */ FixSpringSelf::FixSpringSelf(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), xoriginal(nullptr), kstr(nullptr) + Fix(lmp, narg, arg), xoriginal(nullptr), kstr(nullptr), kval(nullptr) { if ((narg < 4) || (narg > 5)) error->all(FLERR,"Illegal fix spring/self command"); @@ -48,6 +48,8 @@ FixSpringSelf::FixSpringSelf(LAMMPS *lmp, int narg, char **arg) : extscalar = 1; energy_global_flag = 1; respa_level_support = 1; + maxatom = 0; + kvar = -1; if (utils::strmatch(arg[3], "^v_")) { kstr = utils::strdup(arg[3] + 2);