aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-09-21 17:16:17 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-09-21 17:16:17 +0800
commit695c95a8a47d6d2c1092bd6a379743d3939961bc (patch)
tree298fe675dc75ac342267486936496de5f99d68e4 /embed
parent56d52a23335ee2c0fe6dcfe79e778e50cfd41ee7 (diff)
downloadgsoc2013-epiphany-695c95a8a47d6d2c1092bd6a379743d3939961bc.tar
gsoc2013-epiphany-695c95a8a47d6d2c1092bd6a379743d3939961bc.tar.gz
gsoc2013-epiphany-695c95a8a47d6d2c1092bd6a379743d3939961bc.tar.bz2
gsoc2013-epiphany-695c95a8a47d6d2c1092bd6a379743d3939961bc.tar.lz
gsoc2013-epiphany-695c95a8a47d6d2c1092bd6a379743d3939961bc.tar.xz
gsoc2013-epiphany-695c95a8a47d6d2c1092bd6a379743d3939961bc.tar.zst
gsoc2013-epiphany-695c95a8a47d6d2c1092bd6a379743d3939961bc.zip
Fix overflow in remaining time calculation. Fix bug #153136. Thanks to
2004-09-21 Marco Pesenti Gritti <marco@gnome.org> * embed/ephy-download.c: (update_remaining_time): Fix overflow in remaining time calculation. Fix bug #153136. Thanks to Jhon Spray for tracking this.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-download.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index c4165b25d..ee1a0154f 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -150,7 +150,10 @@ update_remaining_time (EphyDownload *download)
if (cur > 0)
{
- download->priv->remaining_time = elapsed_time * (total - cur) / cur;
+ float per_byte_time;
+
+ per_byte_time = (float)elapsed_time / (float)cur;
+ download->priv->remaining_time = time_per_byte * (total - cur);
}
}