I'm trying to get my program to print a simple help message if people use the '-h' switch on the command line. My code is:

Code:
	/* print help message if -h */
	if (strcmp(argv[1], "-h") == 0) {

             print a help message...	

		exit(0);
	}
This works fine. However, when I run it with no switches (normal operation), I get a bus error.
Any suggestions?