]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_oper.cpp
NEVER use the two-param assign unless you want your string padding to len bytes with \0!
[user/henk/code/inspircd.git] / src / commands / cmd_oper.cpp
index dc06d87ced3777284582bc491a03acb1be1de881..1ce7dc49de541ed2295674966455a91e810fc063 100644 (file)
@@ -66,7 +66,7 @@ CmdResult CommandOper::Handle (const std::vector<std::string>& parameters, User
                ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "oper", "hash", i, HashType, MAXBUF);
 
                match_login = (LoginName == parameters[0]);
-               match_pass = !ServerInstance->PassCompare(user, Password,parameters[1].c_str(), HashType);
+               match_pass = !ServerInstance->PassCompare(user, Password, parameters[1], HashType);
                match_hosts = OneOfMatches(TheHost,TheIP,HostName);
 
                if (match_login && match_pass && match_hosts)