summaryrefslogtreecommitdiffhomepage
path: root/src/pty/ptyc_spawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pty/ptyc_spawn.c')
-rw-r--r--src/pty/ptyc_spawn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pty/ptyc_spawn.c b/src/pty/ptyc_spawn.c
index 9ad8e9b..3655d19 100644
--- a/src/pty/ptyc_spawn.c
+++ b/src/pty/ptyc_spawn.c
@@ -79,7 +79,9 @@ int __stdcall ptyc_spawn(struct ptyc_driver_ctx * dctx)
: peb->process_params->cwd_handle;
patharg = (dctx->cctx->eargv[0][0] == '/')
- ? &dctx->cctx->eargv[0][1]
+ ? (dctx->cctx->eargv[0][1] == '?')
+ ? &dctx->cctx->eargv[0][0]
+ : &dctx->cctx->eargv[0][1]
: &dctx->cctx->eargv[0][0];
/* hfile */