diff --git a/libi2pd_client/TorrentsRPC.cpp b/libi2pd_client/TorrentsRPC.cpp index 4e3a76d2..6f06a405 100644 --- a/libi2pd_client/TorrentsRPC.cpp +++ b/libi2pd_client/TorrentsRPC.cpp @@ -404,7 +404,7 @@ namespace torrents { "eta", [](std::shared_ptr torrent) { auto downloadRate = torrent->GetDownloadRate (); - return boost::json::value (downloadRate ? torrent->GetLeft ()/downloadRate : -2); + return boost::json::value (downloadRate ? (int64_t)(torrent->GetLeft ()/downloadRate) : -2); } }, { "uploadRatio", [](std::shared_ptr torrent)