From de2f9b80d9da3ebe417f8884331a06be48c804e7 Mon Sep 17 00:00:00 2001 From: johnhg Date: Mon, 7 Mar 2022 06:32:13 -0700 Subject: [PATCH] Per #1904, fixing a minor copy/paste bug in gen_ens_prod. We were checking the length of config_file instead of out_file. This became obvious when running gen_ens_prod without the -out option. That run segfaulted because it tried to create an output file using an empty string. (#2087) --- met/src/tools/other/gen_ens_prod/gen_ens_prod.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/met/src/tools/other/gen_ens_prod/gen_ens_prod.cc b/met/src/tools/other/gen_ens_prod/gen_ens_prod.cc index eb04d6f38c..ab489047f8 100644 --- a/met/src/tools/other/gen_ens_prod/gen_ens_prod.cc +++ b/met/src/tools/other/gen_ens_prod/gen_ens_prod.cc @@ -154,7 +154,7 @@ void process_command_line(int argc, char **argv) { << "\"-ens\" option.\n\n"; exit(1); } - if(config_file.length() == 0) { + if(out_file.length() == 0) { mlog << Error << "\nprocess_command_line() -> " << "the output file must be set using the " << "\"-out\" option.\n\n";