mirror of
https://github.com/anope/anope.git
synced 2026-07-01 01:26:39 +02:00
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.
This commit is contained in:
@@ -119,7 +119,7 @@ class CommandNSSetPassword : public Command
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
const Anope::string ¶m = params[1];
|
||||
const Anope::string ¶m = params[0];
|
||||
unsigned len = param.length();
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
|
||||
Reference in New Issue
Block a user