-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with uninitialized input parameter block data (#1215)
* Fix bug with parameter input * CHANGELOG/copyright
- Loading branch information
Showing
2 changed files
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
// Copyright(C) 2014 James M. Stone <[email protected]> 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; | ||
|