diff main.c @ 241:4121825716b8

Fix crash when running unknown command via symlink. (The error message was trying to print an uninitialied field. Oops.)
author Rob Landley <rob@landley.net>
date Tue, 22 Jan 2008 15:33:50 -0600
parents 7cb15eae1664
children 951110c37fee
line wrap: on
line diff
--- a/main.c	Mon Jan 21 14:47:08 2008 -0600
+++ b/main.c	Tue Jan 22 15:33:50 2008 -0600
@@ -92,6 +92,7 @@
 	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]);
 		}
 	}