Fix segfault with single build of a command with bare longopts.
diff --git a/scripts/mkflags.c b/scripts/mkflags.c
index eca5960..1706786 100644
--- a/scripts/mkflags.c
+++ b/scripts/mkflags.c
@@ -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)