Fix non-const mapMultiArgs[] access after init.

Swap mapMultiArgs for a const-reference to a _mapMultiArgs which is
only accessed in util.cpp
This commit is contained in:
Matt Corallo
2016-11-29 16:50:49 -08:00
parent c8042a48f0
commit 2b5f085ad1
7 changed files with 56 additions and 43 deletions

View File

@@ -95,7 +95,7 @@ static bool multiUserAuthorized(std::string strUserPass)
if (mapMultiArgs.count("-rpcauth") > 0) {
//Search for multi-user login/pass "rpcauth" from config
BOOST_FOREACH(std::string strRPCAuth, mapMultiArgs["-rpcauth"])
BOOST_FOREACH(std::string strRPCAuth, mapMultiArgs.at("-rpcauth"))
{
std::vector<std::string> vFields;
boost::split(vFields, strRPCAuth, boost::is_any_of(":$"));