From 40b91191ad447d3457b43c57496487776359a252 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 12 Apr 2023 10:58:29 -0600 Subject: [PATCH] Per #2425, initialize stat_row = 0. --- src/tools/tc_utils/tc_stat/tc_stat_job.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/tc_utils/tc_stat/tc_stat_job.cc b/src/tools/tc_utils/tc_stat/tc_stat_job.cc index 59689f6d24..24ab12f217 100644 --- a/src/tools/tc_utils/tc_stat/tc_stat_job.cc +++ b/src/tools/tc_utils/tc_stat/tc_stat_job.cc @@ -237,6 +237,7 @@ void TCStatJob::clear() { StatFile.clear(); close_stat_file(); StatOut = (ofstream *) 0; + stat_row = 0; // Set to default values WaterOnly = default_water_only; @@ -1169,6 +1170,8 @@ void TCStatJob::open_stat_file() { close_stat_file(); + stat_row = 0; + if(StatFile.empty()) return; StatOut = new ofstream;