mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-15 14:22:57 -06:00
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:
parent
1d1c8ad968
commit
aa00459569
1 changed files with 22 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue