diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-13 18:11:57 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-13 18:11:57 +0200 |
commit | e2dd99fa342b45364590ec72746e3118f1779538 (patch) | |
tree | 7541030c21c9e6f64d572af0661a0a3422591596 /src/commands | |
parent | 30a9cd0f5d9d6f96b637adb4afc8dbc727bf1afe (diff) |
Fix more incorrect std::string::operator[] usage
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_list.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_stats.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/cmd_list.cpp b/src/commands/cmd_list.cpp index 8a99ce3e0..eb28fb89c 100644 --- a/src/commands/cmd_list.cpp +++ b/src/commands/cmd_list.cpp @@ -49,7 +49,7 @@ CmdResult CommandList::Handle (const std::vector<std::string>& parameters, User user->WriteNumeric(321, "%s Channel :Users Name",user->nick.c_str()); - if (parameters.size() == 1) + if ((parameters.size() == 1) && (!parameters[0].empty())) { if (parameters[0][0] == '<') { diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp index d547635ed..aa5bf44cd 100644 --- a/src/commands/cmd_stats.cpp +++ b/src/commands/cmd_stats.cpp @@ -39,7 +39,7 @@ class CommandStats : public Command public: /** Constructor for stats. */ - CommandStats ( Module* parent) : Command(parent,"STATS",1,2) { syntax = "<stats-symbol> [<servername>]"; } + CommandStats ( Module* parent) : Command(parent,"STATS",1,2) { allow_empty_last_param = false; syntax = "<stats-symbol> [<servername>]"; } /** Handle command. * @param parameters The parameters to the comamnd * @param pcnt The number of parameters passed to teh command |