Fixed string parsing and substituion bugs isn substitudeEnvVars(..)

This commit is contained in:
Robert Osfield 2017-12-02 17:35:36 +00:00
parent 302f625ec7
commit 490b9b0e0e

View File

@ -1249,15 +1249,19 @@ namespace State_Utils
if (str[pos]=='"' || str[pos]=='\'')
{
std::string::size_type start_quote = pos;
++pos;
++pos; // skip over first quote
pos = str.find(str[start_quote], pos);
if (pos!=std::string::npos)
{
++pos; // skip over second quote
}
}
else
{
std::string::size_type start_var = pos;
++pos;
pos = str.find_first_not_of("ABCDEFGHIJKLMNOPQRTSUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_", pos);
std::string var_str;
if (pos != std::string::npos)
{