diff options
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/ptyc_amain.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/driver/ptyc_amain.c b/src/driver/ptyc_amain.c index 1021048..37c2657 100644 --- a/src/driver/ptyc_amain.c +++ b/src/driver/ptyc_amain.c @@ -56,7 +56,7 @@ static int ptyc_exit(struct ptyc_driver_ctx * dctx, int nerrors) return nerrors ? 2 : 0; } -int ptyc_main(int argc, char ** argv, char ** envp) +int ptyc_main(char ** argv, char ** envp) { int ret; struct ptyc_driver_ctx * dctx; @@ -65,7 +65,9 @@ int ptyc_main(int argc, char ** argv, char ** envp) return ret; if ((ret = ptyc_get_driver_ctx(argv,envp,PTYC_DRIVER_FLAGS,&dctx))) - return (ret == PTYC_USAGE) ? !--argc : 2; + return (ret == PTYC_USAGE) + ? !argv || !argv[0] || !argv[1] + : 2; if (dctx->cctx->drvflags & PTYC_DRIVER_VERSION) if ((ptyc_version(dctx)) < 0) |