From 5a2583ac4ff866caee57b465f429f75417c629ad Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 8 Feb 2014 10:53:26 -0600 Subject: Fix segfault with single build of a command with bare longopts. --- scripts/mkflags.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/mkflags.c') diff --git a/scripts/mkflags.c b/scripts/mkflags.c index eca59603..17067861 100644 --- a/scripts/mkflags.c +++ b/scripts/mkflags.c @@ -111,7 +111,8 @@ int main(int argc, char *argv[]) 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) -- cgit v1.2.3