prevent core dump when no args are given

This commit is contained in:
ceriel 1990-07-18 14:38:48 +00:00
parent c08f3b3c80
commit 8a4be18b77

View File

@ -107,7 +107,7 @@ main(argc, argv)
int err = 0;
prog = *argv++;
if (**argv == '-') {
if (*argv && **argv == '-') {
char *opt = &(*argv++)[1];
if (*opt++ != 'd' || *opt) {