Skip to content

Commit

Permalink
tinyxml2: Change from i4 to i8
Browse files Browse the repository at this point in the history
  • Loading branch information
stickz committed Dec 30, 2024
1 parent 53817f5 commit a3d5903
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions rtorrent/src/rpc/xmlrpc_tinyxml2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,7 @@ print_object_xml(const torrent::Object& obj, tinyxml2::XMLPrinter* printer) {
printer->CloseElement(true);
break;
case torrent::Object::TYPE_VALUE:
if (obj.as_value() > ((torrent::Object::value_type)2 << 30) || obj.as_value() < -((torrent::Object::value_type)2 << 30)) {
printer->OpenElement("i8", true);
} else {
printer->OpenElement("i4", true);
}
printer->OpenElement("i8", true);
printer->PushText(std::to_string(obj.as_value()).c_str());
printer->CloseElement(true);
break;
Expand Down Expand Up @@ -197,7 +193,7 @@ print_object_xml(const torrent::Object& obj, tinyxml2::XMLPrinter* printer) {
printer->CloseElement(true);
break;
default:
printer->OpenElement("i4", true);
printer->OpenElement("i8", true);
printer->PushText(0);
printer->CloseElement(true);
}
Expand Down Expand Up @@ -323,7 +319,7 @@ print_xmlrpc_fault(int faultCode, std::string faultString, tinyxml2::XMLPrinter*
printer->PushText("faultCode");
printer->CloseElement(true);
printer->OpenElement("value", true);
printer->OpenElement("i4", true);
printer->OpenElement("i8", true);
printer->PushText(faultCode);
printer->CloseElement(true);
printer->CloseElement(true);
Expand Down

0 comments on commit a3d5903

Please sign in to comment.