diff options
Diffstat (limited to 'registry')
-rw-r--r-- | registry/tools/checksingleton.cxx | 4 | ||||
-rw-r--r-- | registry/tools/regcompare.cxx | 10 |
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()); } |