summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorMatthias Huetsch [mhu] <matthias.huetsch@oracle.com>2011-02-03 18:44:31 +0100
committerMatthias Huetsch [mhu] <matthias.huetsch@oracle.com>2011-02-03 18:44:31 +0100
commit1dd0eb26bbb9db39bcc34d87a758caf36987cd05 (patch)
treeb8cc55f116874a8386b5ba4cc7426da42643484e /registry
parent6f8bd1a04cb9ebb3959672a43ce1f957bb585e93 (diff)
#i115784# registry/tools: fix initOptions_Impl() commandline argument processing.
Diffstat (limited to 'registry')
-rw-r--r--registry/tools/checksingleton.cxx4
-rw-r--r--registry/tools/regcompare.cxx10
2 files changed, 7 insertions, 7 deletions
diff --git a/registry/tools/checksingleton.cxx b/registry/tools/checksingleton.cxx
index 680201c590d5..e4fc39449e37 100644
--- a/registry/tools/checksingleton.cxx
+++ b/registry/tools/checksingleton.cxx
@@ -146,7 +146,7 @@ bool Options_Impl::initOptions_Impl(std::vector< std::string > & rArgs)
case 'f':
case 'F':
{
- if ((*first)[2] != 0)
+ if ((*first).size() > 2)
{
return badOption("invalid", option.c_str());
}
@@ -156,7 +156,7 @@ bool Options_Impl::initOptions_Impl(std::vector< std::string > & rArgs)
case 'h':
case '?':
{
- if ((*first)[2] != 0)
+ if ((*first).size() > 2)
{
return badOption("invalid", option.c_str());
}
diff --git a/registry/tools/regcompare.cxx b/registry/tools/regcompare.cxx
index 86c06c272163..3e415cec43fc 100644
--- a/registry/tools/regcompare.cxx
+++ b/registry/tools/regcompare.cxx
@@ -208,7 +208,7 @@ bool Options_Impl::initOptions_Impl (std::vector< std::string > & rArgs)
case 'f':
case 'F':
{
- if ((*first)[2] != 0)
+ if ((*first).size() > 2)
{
return badOption("invalid", (*first).c_str());
}
@@ -218,7 +218,7 @@ bool Options_Impl::initOptions_Impl (std::vector< std::string > & rArgs)
case 'c':
case 'C':
{
- if ((*first)[2] != 0)
+ if ((*first).size() > 2)
{
return badOption("invalid", (*first).c_str());
}
@@ -228,7 +228,7 @@ bool Options_Impl::initOptions_Impl (std::vector< std::string > & rArgs)
case 't':
case 'T':
{
- if ((*first)[2] != 0)
+ if ((*first).size() > 2)
{
return badOption("invalid", (*first).c_str());
}
@@ -238,7 +238,7 @@ bool Options_Impl::initOptions_Impl (std::vector< std::string > & rArgs)
case 'u':
case 'U':
{
- if ((*first)[2] != 0)
+ if ((*first).size() > 2)
{
return badOption("invalid", (*first).c_str());
}
@@ -248,7 +248,7 @@ bool Options_Impl::initOptions_Impl (std::vector< std::string > & rArgs)
case 'h':
case '?':
{
- if ((*first)[2] != 0)
+ if ((*first).size() > 2)
{
return badOption("invalid", (*first).c_str());
}