From 7b3276a2bbf25c40a245872ced157211b0aa032d Mon Sep 17 00:00:00 2001 From: Ben Ryan Date: Thu, 5 Dec 2024 21:18:22 -0700 Subject: [PATCH] Fix bug with parameter input --- src/parameter_input.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parameter_input.cpp b/src/parameter_input.cpp index dc6651e0b24c..1ff13c78039c 100644 --- a/src/parameter_input.cpp +++ b/src/parameter_input.cpp @@ -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;