From a269f808e1c78a27b2a929549aaa1d12cfc32363 Mon Sep 17 00:00:00 2001 From: kannibalox Date: Sun, 27 Oct 2024 16:31:19 -0400 Subject: [PATCH] Fix swapped variable names --- src/rpc/xmlrpc_tinyxml2.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/xmlrpc_tinyxml2.cc b/src/rpc/xmlrpc_tinyxml2.cc index a50fbf4e..a190aa35 100644 --- a/src/rpc/xmlrpc_tinyxml2.cc +++ b/src/rpc/xmlrpc_tinyxml2.cc @@ -89,7 +89,7 @@ element_access(const tinyxml2::XMLElement* elem, std::string element_names) { do { auto previous_pos = pos; pos = element_names.find(',', pos + 1); - auto item = element_names.substr(pos, previous_pos - pos); + auto item = element_names.substr(previous_pos, pos - previous_pos); result = result->FirstChildElement(item.c_str()); if (result == nullptr) { throw xmlrpc_error(XMLRPC_PARSE_ERROR, "could not find expected element " + item);