X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_password_hash.cpp;h=09cdbb402c180dd15e95cf15aabb75458f14af1d;hb=f471083cd0519d47c7c7a09029813ede41994f7b;hp=3cdd2b3ced385357ae5e1a9c2465e47de7665b0a;hpb=5c7db14a557d7f980dfaa8c10d40c1ccc554b35d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp index 3cdd2b3ce..09cdbb402 100644 --- a/src/modules/m_password_hash.cpp +++ b/src/modules/m_password_hash.cpp @@ -36,7 +36,7 @@ class CommandMkpasswd : public Command { if (!algo.compare(0, 5, "hmac-", 5)) { - std::string type = algo.substr(5); + std::string type(algo, 5); HashProvider* hp = ServerInstance->Modules->FindDataService("hash/" + type); if (!hp) { @@ -91,7 +91,7 @@ class ModuleOperHash : public Module { if (!hashtype.compare(0, 5, "hmac-", 5)) { - std::string type = hashtype.substr(5); + std::string type(hashtype, 5); HashProvider* hp = ServerInstance->Modules->FindDataService("hash/" + type); if (!hp) return MOD_RES_PASSTHRU;