From 546eede80caf7d8c34646eba5169e22d029d4cda 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 768071549a..b35b3a4cea 100644 --- a/src/thermo/DebyeHuckel.cpp +++ b/src/thermo/DebyeHuckel.cpp @@ -978,7 +978,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 f1e39a84a6..ab261a3809 100644 --- a/src/thermo/HMWSoln_input.cpp +++ b/src/thermo/HMWSoln_input.cpp @@ -1496,7 +1496,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) {