Use std::strncmp for string comparison

This commit is contained in:
kannibalox
2024-10-27 16:40:47 -04:00
committed by Jari Sundell
parent a269f808e1
commit c18df7a366
+1 -1
View File
@@ -103,7 +103,7 @@ xml_value_to_object(const tinyxml2::XMLNode* elem) {
if (elem == nullptr) {
throw xmlrpc_error(XMLRPC_INTERNAL_ERROR, "received null element to convert");
}
if (std::string("value") != elem->Value()) {
if (std::strncmp(elem->Value(), "value", 5)) {
throw xmlrpc_error(XMLRPC_INTERNAL_ERROR, "received non-value element to convert");
}
auto value_element = elem->FirstChild();