diff --git a/CHANGELOG.md b/CHANGELOG.md index 00e37aa88f07..ed674a70fd2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - [[PR 1172]](https://github.com/parthenon-hpc-lab/parthenon/pull/1172) Make parthenon manager robust against external MPI init and finalize calls ### Fixed (not changing behavior/API/variables/...) +- [[PR 1215]](https://github.com/parthenon-hpc-lab/parthenon/pull/1215) Fix issue with uninitialized input parameter block data - [[PR 1211]](https://github.com/parthenon-hpc-lab/parthenon/pull/1211) remove inline from WriteTaskGraph - [[PR 1188]](https://github.com/parthenon-hpc-lab/parthenon/pull/1188) Fix hdf5 output issue for metadata none variables, update test. - [[PR 1170]](https://github.com/parthenon-hpc-lab/parthenon/pull/1170) Fixed incorrect initialization of array by a const not constexpr diff --git a/src/parameter_input.cpp b/src/parameter_input.cpp index dc6651e0b24c..b04ee738527f 100644 --- a/src/parameter_input.cpp +++ b/src/parameter_input.cpp @@ -3,7 +3,7 @@ // Copyright(C) 2014 James M. Stone and other code contributors // Licensed under the 3-clause BSD License, see LICENSE file for details //======================================================================================== -// (C) (or copyright) 2020-2023. Triad National Security, LLC. All rights reserved. +// (C) (or copyright) 2020-2024. Triad National Security, LLC. All rights reserved. // // This program was produced under U.S. Government contract 89233218CNA000001 for Los // Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC @@ -277,6 +277,10 @@ InputBlock *ParameterInput::FindOrAddBlock(const std::string &name) { pib->pline = nullptr; // Terminate the InputLine list pib->pnext = nullptr; // Terminate the InputBlock list + // Default max lengths to zero (in case of no parameters in this block) + pib->max_len_parname = 0; + pib->max_len_parvalue = 0; + // if this is the first block in list, save pointer to it in class if (pfirst_block == nullptr) { pfirst_block = pib;