mirror of
https://github.com/transmission/transmission
synced 2024-12-23 08:13:27 +00:00
Don't return NaN from Torrent::percentComplete (Qt client)
This commit is contained in:
parent
c5e730c63a
commit
f1656bc209
1 changed files with 1 additions and 1 deletions
|
@ -314,7 +314,7 @@ public:
|
|||
|
||||
double percentComplete() const
|
||||
{
|
||||
return haveTotal() / static_cast<double>(totalSize());
|
||||
return totalSize() != 0 ? haveTotal() / static_cast<double>(totalSize()) : 0;
|
||||
}
|
||||
|
||||
double percentDone() const
|
||||
|
|
Loading…
Reference in a new issue