Merge pull request #104 from AoD314:master

This commit is contained in:
marina.kolpakova 2012-10-29 15:12:28 +04:00
commit 0f65dacb8b

View File

@ -185,6 +185,13 @@ CommandLineParser::CommandLineParser(int argc, const char* const argv[], const s
p.def_value = l[1]; p.def_value = l[1];
p.help_message = impl->cat_string(l[2]); p.help_message = impl->cat_string(l[2]);
p.number = -1; p.number = -1;
if (p.keys.size() <= 0)
{
impl->error = true;
impl->error_message = "Field KEYS could not be empty\n";
}
else
{
if (p.keys[0][0] == '@') if (p.keys[0][0] == '@')
{ {
p.number = jj; p.number = jj;
@ -193,6 +200,7 @@ CommandLineParser::CommandLineParser(int argc, const char* const argv[], const s
impl->data.push_back(p); impl->data.push_back(p);
} }
}
// parse argv // parse argv
jj = 0; jj = 0;