1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 09:32:45 +00:00

Fixed escaping @ in boost program options filter

This commit is contained in:
Alexander Stillich 2017-11-05 21:40:35 +01:00 committed by scrawl
parent dc016059c3
commit 92aaff3b78
2 changed files with 8 additions and 1 deletions

View File

@ -27,7 +27,8 @@ namespace Files
std::string EscapeHashString::processString(const std::string & str)
{
std::string temp = boost::replace_all_copy<std::string>(str, std::string() + (char)escape_hash_filter::sEscape + (char)escape_hash_filter::sHashIdentifier, "#");
boost::replace_all(temp, std::string() + (char)escape_hash_filter::sEscape + (char)escape_hash_filter::sEscapeIdentifier, std::string((char)escape_hash_filter::sEscape, 1));
auto format = std::string(1, (char)escape_hash_filter::sEscape);
boost::replace_all(temp, std::string() + (char)escape_hash_filter::sEscape + (char)escape_hash_filter::sEscapeIdentifier, format);
return temp;
}

View File

@ -78,6 +78,12 @@ namespace Files
mFinishLine = true;
}
}
else if (character == sEscape)
{
mNext.push(sEscape);
mNext.push(sEscapeIdentifier);
record = false;
}
else if (mPrevious == sEscape)
{
mNext.push(sEscape);