Mercurial > hg > openttd
changeset 11686:b1d159cb9026 draft
(svn r16071) -Fix [FS#2845]: content download progress bar 'resetting' due to mathematical overflow.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Fri, 17 Apr 2009 17:48:33 +0000 |
parents | 69e8da3110ce |
children | d2838830b8e5 |
files | src/network/network_content_gui.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -123,11 +123,11 @@ 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) {