Update src/xrpld/rpc/detail/RPCCall.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Mayukha Vadari
2026-03-02 17:59:07 -04:00
committed by GitHub
parent 26bdc7198c
commit c7f9904112

View File

@@ -446,7 +446,8 @@ private:
std::size_t colon = ip.find_last_of(":");
jvRequest[jss::ip] = std::string{ip, 0, colon};
if (auto const port = jvParseUInt(std::string{ip, colon + 1}))
Json::Value portJson(std::string{ip, colon + 1});
if (auto const port = jvParseUInt(portJson))
jvRequest[jss::port] = *port;
else
return RPC::invalid_field_error(jss::port);