From d18d5be4985111df5b87b361c91d56aee88d164a Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Fri, 20 Aug 2021 20:04:19 -0500 Subject: [PATCH] Modify GetASCIIMap to include empty strings --- src/Base/Parameter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Base/Parameter.cpp b/src/Base/Parameter.cpp index 377a669410..53236af1cc 100644 --- a/src/Base/Parameter.cpp +++ b/src/Base/Parameter.cpp @@ -754,6 +754,8 @@ std::vector ParameterGrp::GetASCIIs(const char * sFilter) const DOMNode *pcElem2 = pcTemp->getFirstChild(); if (pcElem2) vrValues.emplace_back(StrXUTF8(pcElem2->getNodeValue()).c_str() ); + else + vrValues.emplace_back(""); // For a string, an empty value is possible and allowed } pcTemp = FindNextElement(pcTemp,"FCText"); } @@ -776,6 +778,8 @@ std::vector > ParameterGrp::GetASCIIMap(const DOMNode *pcElem2 = pcTemp->getFirstChild(); if (pcElem2) vrValues.emplace_back(Name, std::string(StrXUTF8(pcElem2->getNodeValue()).c_str())); + else + vrValues.emplace_back(Name, std::string()); // For a string, an empty value is possible and allowed } pcTemp = FindNextElement(pcTemp,"FCText"); }