summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/process/ntapi_tt_spawn_native_process.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/process/ntapi_tt_spawn_native_process.c b/src/process/ntapi_tt_spawn_native_process.c
index 811c724..1458e78 100644
--- a/src/process/ntapi_tt_spawn_native_process.c
+++ b/src/process/ntapi_tt_spawn_native_process.c
@@ -95,11 +95,13 @@ int32_t __stdcall __ntapi_tt_spawn_native_process(nt_spawn_process_params * spar
: peb->process_params->cwd_handle;
/* patharg */
- patharg = (sparams->patharg[0] == '/')
- ? (sparams->patharg[1] == '?')
- ? &sparams->patharg[0]
- : &sparams->patharg[1]
- : &sparams->patharg[0];
+ patharg = sparams->patharg
+ ? (sparams->patharg[0] == '/')
+ ? (sparams->patharg[1] == '?')
+ ? &sparams->patharg[0]
+ : &sparams->patharg[1]
+ : &sparams->patharg[0]
+ : 0;
/* rtblock, rdata */
rtblock.addr = 0;