summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-03-29 18:18:27 -0400
committerAdam <Adam@anope.org>2014-03-31 20:11:36 -0400
commit317d55f3f1ca3ed75b384ce69dbb696e93c71b22 (patch)
treeb1c328b92e4b0799f394c505dc24e896975bcee3
parent1397fda7869f5b70dd3c969c3c3c1c104cf31631 (diff)
Fix ns_set password to read the correct parameter.
Even though 1 is past the "end" of the vector, because vectors never shrink and due to how the command parser works, it is always less than the capacity, and almost always contains what is in params[0] (though this is of course implementation dependant), which is why this was not identified sooner, as it executes cleanly under valgrind on every machine I can find.
-rw-r--r--modules/commands/ns_set.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index e6526a913..063b7c4dd 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -119,7 +119,7 @@ class CommandNSSetPassword : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
- const Anope::string &param = params[1];
+ const Anope::string &param = params[0];
unsigned len = param.length();
if (Anope::ReadOnly)