diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 9aadfde85..f03705e68 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -660,7 +660,8 @@ tr_torrentStat( tr_torrent * tor ) tr_bitfieldFree( availablePieces ); } - s->ratio = tr_getRatio( s->uploadedEver, MAX( s->downloadedEver, s->haveValid ) ); + s->ratio = tr_getRatio( s->uploadedEver, + s->downloadedEver ? s->downloadedEver : s->haveValid ); tr_torrentUnlock( tor );