From 64ed6d659aff01f11e92bce15eca83a75f7cd75e Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Fri, 23 Oct 2015 11:27:53 +0200 Subject: [PATCH] Fix stack overflow (and bug) with TTSE and mass-based units; closes #843 --- src/Backends/Tabular/TTSEBackend.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Backends/Tabular/TTSEBackend.cpp b/src/Backends/Tabular/TTSEBackend.cpp index f6e00012..a21f1ec0 100644 --- a/src/Backends/Tabular/TTSEBackend.cpp +++ b/src/Backends/Tabular/TTSEBackend.cpp @@ -136,7 +136,7 @@ void CoolProp::TTSEBackend::update(CoolProp::input_pairs input_pair, double val1 } case DmassP_INPUTS:{ // Call again, but this time with molar units; D: [kg/m^3] / [kg/mol] -> [mol/m^3] - update(DmassP_INPUTS, val1 / AS->molar_mass(), val2); return; + update(DmolarP_INPUTS, val1 / AS->molar_mass(), val2); return; } case PUmass_INPUTS:{ // Call again, but this time with molar units; U: [J/kg] * [kg/mol] -> [J/mol] @@ -174,11 +174,11 @@ void CoolProp::TTSEBackend::update(CoolProp::input_pairs input_pair, double val1 } case DmassT_INPUTS:{ // Call again, but this time with molar units; D: [kg/m^3] / [kg/mol] -> [mol/m^3] - update(DmassP_INPUTS, val1 / AS->molar_mass(), val2); return; + update(DmolarT_INPUTS, val1 / AS->molar_mass(), val2); return; } case SmassT_INPUTS:{ // Call again, but this time with molar units; S: [J/kg/K] * [kg/mol] -> [J/mol/K] - update(PSmolar_INPUTS, val1*AS->molar_mass(),val2); return; + update(SmolarT_INPUTS, val1*AS->molar_mass(), val2); return; } case SmolarT_INPUTS: case DmolarT_INPUTS:{