Commit 25748911 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

fix optional argument scanning bug

(cherry picked from commit 2a90afe7e9a1b3afe00c286971700d9363c44842)
parent 332d6821
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ void Balance::command(int narg, char **arg)
  // get max number of imbalance weight flags/classes
  nimbalance = 0;
  for (int i=iarg; i < narg; ++i)
    if (strcmp(arg[iarg],"weight") == 0) ++nimbalance;
    if (strcmp(arg[i],"weight") == 0) ++nimbalance;
  if (nimbalance) imbalance = new Imbalance*[nimbalance];

  nimbalance = outflag = 0;
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ FixBalance::FixBalance(LAMMPS *lmp, int narg, char **arg) :
  nimbalance = 0;
  imbalance = NULL;
  for (int i=iarg; i < narg; ++i)
    if (strcmp(arg[iarg],"weight") == 0) ++nimbalance;
    if (strcmp(arg[i],"weight") == 0) ++nimbalance;
  if (nimbalance) imbalance = new Imbalance*[nimbalance];

  outflag = 0;