ignoring \x0. Closes #2
authorozzloy <ozzloy@zero7.(none)>
Sun, 7 Mar 2010 22:07:10 +0000 (14:07 -0800)
committerozzloy <ozzloy@zero7.(none)>
Sun, 7 Mar 2010 22:07:10 +0000 (14:07 -0800)
oble.cpp

index fcba87c697cf05f7061bc12909072f40c5a94459..5de3abe301275852c999d03c00c15458c108a1a6 100644 (file)
--- 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();
                }
        }