# HG changeset patch # User Rob Landley # Date 1391878406 21600 # Node ID ce31c87e186269966229355606fcbf89cca76040 # Parent c08555a9d94826b5e87cb8920a3d8011a982835d Fix segfault with single build of a command with bare longopts. diff -r c08555a9d948 -r ce31c87e1862 scripts/mkflags.c --- a/scripts/mkflags.c Fri Feb 07 07:56:46 2014 -0600 +++ b/scripts/mkflags.c Sat Feb 08 10:53:26 2014 -0600 @@ -111,7 +111,8 @@ flist->lopt = flist->lopt->next; } else printf("#define FLAG_%s 0\n", aflist->lopt->command); aflist->lopt = aflist->lopt->next; - } else { + if (!aflist->command) aflist = aflist->next; + } else if (aflist->command) { if (flist && (!aflist->command || *aflist->command == *flist->command)) { if (aflist->command)