summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-17 17:48:33 +0000
committerrubidium <rubidium@openttd.org>2009-04-17 17:48:33 +0000
commitf14425e2c461019e15fcb962d0a53554fd7eb139 (patch)
treec122a6fa0c8a87bdd2453566aa0e2c56a6dad2a8
parent36bb2f823a965e5f30d5ffdc951597542e32e43c (diff)
downloadopenttd-f14425e2c461019e15fcb962d0a53554fd7eb139.tar.xz
(svn r16071) -Fix [FS#2845]: content download progress bar 'resetting' due to mathematical overflow.
-rw-r--r--src/network/network_content_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index f6ab0370d..246f91312 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -123,11 +123,11 @@ public:
this->DrawWidgets();
/* Draw nice progress bar :) */
- DrawFrameRect(20, 18, 20 + (int)((this->width - 40) * this->downloaded_bytes / this->total_bytes), 28, COLOUR_MAUVE, FR_NONE);
+ DrawFrameRect(20, 18, 20 + (int)((this->width - 40LL) * this->downloaded_bytes / this->total_bytes), 28, COLOUR_MAUVE, FR_NONE);
SetDParam(0, this->downloaded_bytes);
SetDParam(1, this->total_bytes);
- SetDParam(2, this->downloaded_bytes * 100 / this->total_bytes);
+ SetDParam(2, this->downloaded_bytes * 100LL / this->total_bytes);
DrawString(this->widget[NCDSWW_BACKGROUND].left + 2, this->widget[NCDSWW_BACKGROUND].right - 2, 35, STR_CONTENT_DOWNLOAD_PROGRESS_SIZE, TC_GREY, SA_CENTER);
if (this->downloaded_bytes == this->total_bytes) {