prevent core dump when no args are given
This commit is contained in:
parent
379511e232
commit
3e27993361
|
@ -107,7 +107,7 @@ main(argc, argv)
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
prog = *argv++;
|
prog = *argv++;
|
||||||
if (**argv == '-') {
|
if (*argv && **argv == '-') {
|
||||||
char *opt = &(*argv++)[1];
|
char *opt = &(*argv++)[1];
|
||||||
|
|
||||||
if (*opt++ != 'd' || *opt) {
|
if (*opt++ != 'd' || *opt) {
|
||||||
|
|
Loading…
Reference in a new issue