From 83e58eadb7b31974cf347e622615dc428da080ea Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 15 Oct 2021 20:23:31 -0400 Subject: [PATCH] correct expansion of fix/compute/variable arguments to avoid bogus thermo outpu --- src/utils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils.cpp b/src/utils.cpp index 25be3f3b02..507500f116 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -661,7 +661,10 @@ int utils::expand_args(const char *file, int line, int narg, char **arg, int mod } for (int index = nlo; index <= nhi; index++) { - earg[newarg] = utils::strdup(fmt::format("{}2_{}[{}]{}", word[0], id, index, tail)); + if (word[1] == '2') + earg[newarg] = utils::strdup(fmt::format("{}2_{}[{}]{}", word[0], id, index, tail)); + else + earg[newarg] = utils::strdup(fmt::format("{}_{}[{}]{}", word[0], id, index, tail)); newarg++; } } else {