diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 08640a3d93..a483355d62 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -932,7 +932,7 @@ std::vector CRPCTable::listCommands() const boost::bind(&commandMap::value_type::first,boost::placeholders::_1) ); // remove deprecated commands from autocomplete for(auto &command: DEPRECATED_RPCS) { - std::remove(commandList.begin(), commandList.end(), command); + commandList.erase(std::remove(commandList.begin(), commandList.end(), command), commandList.end()); } return commandList; }