Fix call to strstrip

This commit is contained in:
Ian Bell
2016-01-21 22:33:56 -07:00
parent 15184c5751
commit 163b217b83
2 changed files with 5 additions and 1 deletions

View File

@@ -205,7 +205,8 @@ std::string REFPROPMixtureBackend::version(){
lengthofreference, // Length of reference
errormessagelength // Length of error message
);
return strstrip(std::string(herr, herr+254));
std::string s(herr, herr+254);
return strstrip(s);
}
void REFPROPMixtureBackend::set_REFPROP_fluids(const std::vector<std::string> &fluid_names)

View File

@@ -861,6 +861,9 @@ std::string get_global_param_string(const std::string &ParamName)
else if (!ParamName.compare("HOME")){
return get_home_dir();
}
else if (ParamName == "REFPROP_version"){
return REFPROPMixtureBackend::version();
}
else{
throw ValueError(format("Input value [%s] is invalid",ParamName.c_str()));
}