Fix NULL pointer reference.

This commit is contained in:
mycroft 1993-04-26 15:03:05 +00:00
parent 6ebc3bcac9
commit de7626c37e
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ done: argc -= optind;
dflag = uflag = 1;
/* because of the +, getopt is messed up */
for (; **argv == '+' || **argv == '-'; ++argv, --argc)
for (; *argv && (**argv == '+' || **argv == '-'); ++argv, --argc)
switch (**argv) {
case '+':
if ((numchars = atoi(*argv + 1)) < 0)