diff options
author | Chin Lee <kwangchin@gmail.com> | 2012-05-16 15:19:16 +0800 |
---|---|---|
committer | Robin Burchell <robin+git@viroteck.net> | 2012-05-16 14:25:22 +0200 |
commit | c745072bec0708b5d1718a325e7c983836f37a6d (patch) | |
tree | 96b51d95a6d2c3a4d0b1242582d844b9fccea2e3 /src | |
parent | 3ae7efa14f06720b24d17a11e851439fb645376f (diff) |
Check whether it is empty parameter before checking its value
Diffstat (limited to 'src')
-rw-r--r-- | src/commands/cmd_list.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commands/cmd_list.cpp b/src/commands/cmd_list.cpp index d1eddad9d..2f417bc04 100644 --- a/src/commands/cmd_list.cpp +++ b/src/commands/cmd_list.cpp @@ -73,7 +73,7 @@ CmdResult CommandList::Handle (const std::vector<std::string>& parameters, User if (too_many || too_few) continue; - if (parameters.size() && (parameters[0][0] != '<' && parameters[0][0] != '>') && !parameters[0].empty()) + if (parameters.size() && !parameters[0].empty() && (parameters[0][0] != '<' && parameters[0][0] != '>')) { if (!InspIRCd::Match(i->second->name, parameters[0]) && !InspIRCd::Match(i->second->topic, parameters[0])) continue; |