X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fgetopt.cpp;h=766b858e8d4aa4b2212b94f51756cad0a07a964b;hp=911b673d9b1d28358966a302de44aaf6428735e3;hb=154d5f43f7a6633a4937499039fc1b1b713e0c0c;hpb=bdab2ba010fd279c0c5f5e7ef84e1787276d5bb8 diff --git a/source/core/getopt.cpp b/source/core/getopt.cpp index 911b673..766b858 100644 --- a/source/core/getopt.cpp +++ b/source/core/getopt.cpp @@ -21,7 +21,7 @@ GetOpt::OptBase &GetOpt::add_option(OptBase *opt) { for(list::iterator i=opts.begin(); i!=opts.end(); ) { - if((*i)->get_short()==opt->get_short() || (*i)->get_long()==opt->get_long()) + if((opt->get_short()!=0 && (*i)->get_short()==opt->get_short()) || (*i)->get_long()==opt->get_long()) { delete *i; opts.erase(i++);