Bazaar/SysExec : fixed parsing arguments with embedded escaped chars

git-svn-id: svn://ultimatepp.org/upp/trunk@8148 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
micio 2015-02-07 22:22:46 +00:00
parent 1d1c8ad968
commit aa00459569

View file

@ -29,12 +29,32 @@ char **BuildArgs(String const &command, String const &argline)
c = argline[++pos];
while (c && c != '"')
{
s << c;
c = argline[++pos];
if(c == '\\')
{
c = argline[++pos];
if(!c)
break;
s << c;
c = argline[++pos];
}
else
{
s << c;
c = argline[++pos];
}
}
if (c)
c = argline[++pos];
}
// read escaped characters
else if(c == '\\')
{
c = argline[++pos];
if(!c)
break;
s << c;
c = argline[++pos];
}
else
{
s << c;