diff options
author | corvid <corvid@lavabit.com> | 2009-11-09 20:14:07 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-11-09 20:14:07 +0000 |
commit | de79c067074229654bf8b5edc124448f61788ad7 (patch) | |
tree | 22b391e80b861ae166a7db21108c9d4299d2af1e | |
parent | 67cab0ec64e4b66793675f8e83c4820c5dbd9be3 (diff) |
downloads dpi div. by 0
-rw-r--r-- | dpi/downloads.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dpi/downloads.cc b/dpi/downloads.cc index c5d43d8b..5aa7a87c 100644 --- a/dpi/downloads.cc +++ b/dpi/downloads.cc @@ -583,7 +583,9 @@ void DLItem::update_size(int new_sz) prBar->move(1); } else { prBar->showtext(true); - double pos = 100.0 * (double)curr_bytesize / total_bytesize; + double pos = 100.0; + if (total_bytesize > 0) + pos *= (double)curr_bytesize / total_bytesize; prBar->position(pos); } } |