From 6d4540435e93c17c86fb782c8549903f30fc77f8 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 31 Jul 2015 21:12:42 -0400 Subject: [PATCH] Fix pointer logic errors in initThermoXML Affects DebyeHuckel and HMWSoln --- src/thermo/DebyeHuckel.cpp | 2 +- src/thermo/HMWSoln_input.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thermo/DebyeHuckel.cpp b/src/thermo/DebyeHuckel.cpp index 4aef6632f..d39b72ac0 100644 --- a/src/thermo/DebyeHuckel.cpp +++ b/src/thermo/DebyeHuckel.cpp @@ -1037,7 +1037,7 @@ void DebyeHuckel::initThermoXML(XML_Node& phaseNode, const std::string& id_) for (size_t k = 0; k < m_kk; k++) { std::string kname = speciesName(k); const XML_Node* spPtr = xspecies[k]; - if (!spPtr) { + if (spPtr) { if (spPtr->hasChild("electrolyteSpeciesType")) { std::string est = getChildValue(*spPtr, "electrolyteSpeciesType"); if ((m_electrolyteSpeciesType[k] = interp_est(est)) == -1) { diff --git a/src/thermo/HMWSoln_input.cpp b/src/thermo/HMWSoln_input.cpp index 99ebdfd13..aef788a59 100644 --- a/src/thermo/HMWSoln_input.cpp +++ b/src/thermo/HMWSoln_input.cpp @@ -1533,7 +1533,7 @@ void HMWSoln::initThermoXML(XML_Node& phaseNode, const std::string& id_) std::vector xspecies = speciesData(); for (size_t k = 0; k < m_kk; k++) { const XML_Node* spPtr = xspecies[k]; - if (!spPtr) { + if (spPtr) { if (spPtr->hasChild("electrolyteSpeciesType")) { string est = getChildValue(*spPtr, "electrolyteSpeciesType"); if ((m_electrolyteSpeciesType[k] = interp_est(est)) == -1) {