aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-09-27 19:58:18 -0500
committerRob Landley <rob@landley.net>2014-09-27 19:58:18 -0500
commitdc1af185e73410c5cad997c600678c212262a13c (patch)
tree43b8dff99d6607f726dd47b56965779da8bc1128 /lib
parente0d8009d76b3a2451cb6c6ed2b241c7eff06ed60 (diff)
downloadtoybox-dc1af185e73410c5cad997c600678c212262a13c.tar.gz
Don't segfault for --help of single.sh build of OLDTOY commands that use another command's help.
Diffstat (limited to 'lib')
-rw-r--r--lib/help.c5
1 files changed, 5 insertions, 0 deletions
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;
}