From ffe660a60f1c868b237d566a78a3a89fa3f232c0 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Thu, 12 Sep 2024 13:20:33 -0600 Subject: [PATCH] APREPRO: Let format() command work with empty format specifier to give full precision output --- packages/seacas/libraries/aprepro_lib/apr_builtin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/seacas/libraries/aprepro_lib/apr_builtin.cc b/packages/seacas/libraries/aprepro_lib/apr_builtin.cc index d19ee2548c..451a0b0e1f 100644 --- a/packages/seacas/libraries/aprepro_lib/apr_builtin.cc +++ b/packages/seacas/libraries/aprepro_lib/apr_builtin.cc @@ -832,7 +832,7 @@ namespace SEAMS { const char *do_format(double var, char *format) { - auto tmpstr = fmt::sprintf(format, var); + auto tmpstr = std::strlen(format) > 0 ? fmt::sprintf(format, var) : fmt::format("{}", var); char *tmp; new_string(tmpstr.c_str(), &tmp); return tmp;