Added handling of \ within srings by using \\

This commit is contained in:
Robert Osfield
2008-05-27 16:32:17 +00:00
parent 526f8cd8dc
commit 7ab1219ea3
2 changed files with 29 additions and 6 deletions

View File

@@ -111,7 +111,12 @@ std::string Output::wrapString(const std::string& str)
newstring += '"';
for(unsigned int i=0;i<str.size();++i)
{
if (str[i]=='"')
if (str[i]=='\\')
{
newstring += '\\';
newstring += '\\';
}
else if (str[i]=='"')
{
newstring += '\\';
newstring += '"';