From: Paul Eggert Date: Thu, 26 Dec 2002 06:55:45 +0000 (+0000) Subject: (getargs) [MSDOS]: Don't assume optarg != NULL X-Git-Tag: BISON-1_875~35 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/fcbfa6b01c0222b01254730c66d539ed2c841a4e (getargs) [MSDOS]: Don't assume optarg != NULL with -g option. --- diff --git a/src/getargs.c b/src/getargs.c index 23b06394..ffdff8ab 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -355,7 +355,8 @@ getargs (int argc, char *argv[]) case 'g': /* Here, the -g and --graph=FILE options are differentiated. */ graph_flag = 1; - spec_graph_file = AS_FILE_NAME (optarg); + if (optarg) + spec_graph_file = AS_FILE_NAME (optarg); break; case 'v':