aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.cpp
diff options
context:
space:
mode:
authorGravatar Peter Ammon <corydoras@ridiculousfish.com>2012-01-14 22:32:45 -0800
committerGravatar Peter Ammon <corydoras@ridiculousfish.com>2012-01-14 22:32:45 -0800
commit9b133a978d5f33985a9b66d3a75165e3d50cdfa3 (patch)
treee846e195756904d8c007ae1f33e77a53d696102c /exec.cpp
parent203c749e6cc2d5ac0e9e8e240c77d94e179c60d0 (diff)
Improve const and signed/unsigned correctness
Diffstat (limited to 'exec.cpp')
-rw-r--r--exec.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/exec.cpp b/exec.cpp
index 6a8e463e..f82e66e3 100644
--- a/exec.cpp
+++ b/exec.cpp
@@ -543,8 +543,9 @@ static void launch_process( process_t *p )
count++;
res = (wchar_t **)malloc( sizeof(wchar_t*)*(count+2));
-
- res[0] = L"/bin/sh";
+ wchar_t sh_command[] = L"/bin/sh";
+
+ res[0] = sh_command;
res[1] = p->actual_cmd;
for( i=1; p->argv[i]; i++ ){
@@ -553,7 +554,7 @@ static void launch_process( process_t *p )
res[i+1] = 0;
p->argv = res;
- p->actual_cmd = L"/bin/sh";
+ p->actual_cmd = sh_command;
res_real = wcsv2strv( (const wchar_t **) res);