From 255d7b0efae1ec938e1d5cae793360521ce48ff6 Mon Sep 17 00:00:00 2001 From: ozzloy Date: Sun, 7 Mar 2010 14:07:10 -0800 Subject: [PATCH] ignoring \x0. Closes #2 --- oble.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } } -- 2.30.2