summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2020-03-25 22:47:48 +0800
committerruki <[email protected]>2020-03-25 10:46:52 +0800
commit357c8504a1421dff16e3c7edc54959efd75f6654 (patch)
tree3080c3bbd28d856925df38c2a88ff85f29a95f3b /core/src
parent6cea9b08790ce55bc278c0567ac0b1d00f896707 (diff)
improve os.args
Diffstat (limited to 'core/src')
m---------core/src/tbox/tbox0
-rw-r--r--core/src/xmake/os/args.c4
2 files changed, 2 insertions, 2 deletions
diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox
-Subproject ee9ecebbd0d86a513cf3ccf521bf302685f9469
+Subproject 2ad3d467643f5029d2ff5d520a4ff19188e5849
diff --git a/core/src/xmake/os/args.c b/core/src/xmake/os/args.c
index 419e6db54..567d70d30 100644
--- a/core/src/xmake/os/args.c
+++ b/core/src/xmake/os/args.c
@@ -47,10 +47,10 @@ static tb_void_t tb_os_args_append(tb_string_ref_t result, tb_char_t const* cstr
tb_size_t m = tb_arrayn(buff);
while ((ch = *p) && n < m)
{
+ // escape '"'
if (ch == '\"')
{
if (n < m) buff[n++] = '\\';
- wrap_quote = tb_true;
}
else if (ch == ' ' || ch == '(' || ch == ')') wrap_quote = tb_true;
if (n < m) buff[n++] = ch;
@@ -59,7 +59,7 @@ static tb_void_t tb_os_args_append(tb_string_ref_t result, tb_char_t const* cstr
tb_assert_and_check_return(n < m);
buff[n] = '\0';
- // wrap "" and escape '\\' if exists escape characters and spaces?
+ // wrap "" if exists escape characters and spaces?
if (wrap_quote)
{
tb_string_chrcat(result, '\"');