From: ozzloy Date: Sun, 7 Mar 2010 22:07:10 +0000 (-0800) Subject: ignoring \x0. Closes #2 X-Git-Url: http://challenge-bot.com/repos/?p=ozzloy%40gmail.com%2Foble;a=commitdiff_plain;h=255d7b0efae1ec938e1d5cae793360521ce48ff6 ignoring \x0. Closes #2 --- diff --git a/oble.cpp b/oble.cpp index fcba87c..5de3abe 100644 --- a/oble.cpp +++ b/oble.cpp @@ -152,7 +152,7 @@ int parse_opts(int argc, char **argv) { int index, c; opterr = 0; - const char *options = "vc:"; + const char *options = "vc:\x0"; while((c = getopt(argc, argv, options)) != -1) { switch(c) @@ -173,6 +173,7 @@ int parse_opts(int argc, char **argv) printf("unknown option char `\\x%x'.\n", optopt); } break; + case '\x0': break; //ignore. not sure why this shows up. maybe zsh? default: abort(); } }