aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2008-01-22 15:33:50 -0600
committerRob Landley <rob@landley.net>2008-01-22 15:33:50 -0600
commit841223d68877f4b12b1c08281e6471e58912120b (patch)
tree55180ea50879d8d446859ebf854f5cc9b3b29b4a /main.c
parent41cb696013ffacfca73e92cd164b96f903c60ca1 (diff)
downloadtoybox-841223d68877f4b12b1c08281e6471e58912120b.tar.gz
Fix crash when running unknown command via symlink.
(The error message was trying to print an uninitialied field. Oops.)
Diffstat (limited to 'main.c')
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.c b/main.c
index d9408f38..18daafbf 100644
--- a/main.c
+++ b/main.c
@@ -92,6 +92,7 @@ void toybox_main(void)
if (toys.argv[1]) {
if (toys.argv[1][0]!='-') {
toy_exec(toys.argv+1);
+ toys.which = toy_list;
error_exit("Unknown command %s",toys.argv[1]);
}
}