Mercurial > hg > toybox
changeset 1198:ce31c87e1862 draft
Fix segfault with single build of a command with bare longopts.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 08 Feb 2014 10:53:26 -0600 |
parents | c08555a9d948 |
children | ff8d73e78089 |
files | scripts/mkflags.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)