From dc1af185e73410c5cad997c600678c212262a13c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 27 Sep 2014 19:58:18 -0500 Subject: Don't segfault for --help of single.sh build of OLDTOY commands that use another command's help. --- lib/help.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/help.c') diff --git a/lib/help.c b/lib/help.c index 6a0c7b4a..9965539d 100644 --- a/lib/help.c +++ b/lib/help.c @@ -25,6 +25,11 @@ void show_help(void) while (i--) s += strlen(s) + 1; // If it's an alias, restart search for real name if (*s != 255) break; + if (!CFG_TOYBOX) { + s = xmprintf("See %s --help\n", ++s); + + break; + } i = toy_find(++s)-toy_list; } -- cgit v1.2.3