summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-02-06 19:59:56 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-02-06 19:59:56 +0000
commitcf119827779b5987cc1c770af5a81b76afb2079e (patch)
tree74793d2b89a60ee791b7ccbf31a56e03384a3952 /src
parent3094218489b1e14e4e6462b93180425a1b04f86d (diff)
--enable-debug in configure script and fix possible divide by zero in torrent updates
Diffstat (limited to 'src')
-rw-r--r--src/trg-torrent-model.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/trg-torrent-model.c b/src/trg-torrent-model.c
index 89ce37d..95406fe 100644
--- a/src/trg-torrent-model.c
+++ b/src/trg-torrent-model.c
@@ -206,7 +206,7 @@ update_torrent_iter(gint64 serial, TrgTorrentModel * model,
TORRENT_COLUMN_DOWNLOADED, downloaded,
TORRENT_COLUMN_RATIO,
uploaded >
- 0 ? (double) uploaded / (double) downloaded : 0,
+ 0 && downloaded > 0 ? (double) uploaded / (double) downloaded : 0,
TORRENT_COLUMN_ID, id, TORRENT_COLUMN_JSON, t,
TORRENT_COLUMN_UPDATESERIAL, serial, -1);