Commits

Palmer, 2E0EOL  committed bd92332

Fix an annoying bug where next argument would be silently swallowed by -D processing.
User isn't always likely to know that they _must_ specify a debug level, so be explicit
about failure.

  • Participants
  • Parent commits 71f71fa

Comments (0)

Files changed (1)

 	while ( (c = getopt(ArgC, ArgV, "D:d:s:")) != -1 ) {
 		switch ( c ) {
 			case 'D' : {
+				if ( optarg[0] == '-' ) {
+					fprintf(stderr, "Option -%c takes an argument.\n", c);
+					return false;
+				}
 				DebugLevel = (unsigned int)(abs(atoi(optarg)));
 				break;
 			}