Don't segfault for --help of single.sh build of OLDTOY commands that use another command's help.
diff --git a/main.c b/main.c
index 6e7d267..c3577b6 100644
--- a/main.c
+++ b/main.c
@@ -26,6 +26,8 @@
{
int top, bottom, middle;
+ if (!CFG_TOYBOX) return 0;
+
// If the name starts with "toybox" accept that as a match. Otherwise
// skip the first entry, which is out of order.
@@ -69,7 +71,7 @@
if (CFG_TOYBOX_I18N) setlocale(LC_ALL, "C"+!!(which->flags & TOYFLAG_LOCALE));
if (CFG_TOYBOX_HELP_DASHDASH && argv[1] && !strcmp(argv[1], "--help")) {
- if (toys.which == toy_list && toys.argv[2])
+ if (CFG_TOYBOX && toys.which == toy_list && toys.argv[2])
if (!(toys.which = toy_find(toys.argv[2]))) return;
show_help();
xexit();