overflow fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-03-03 15:30:20 +00:00
parent 534f031251
commit fd9655adba
2 changed files with 106 additions and 1 deletions

View File

@@ -337,7 +337,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
if ( (m_elapsed || m_remaining || m_estimated) && (value != 0) )
{
unsigned long elapsed = wxGetCurrentTime() - m_timeStart;
unsigned long estimated = elapsed * m_maximum / value;
unsigned long estimated = ( (double) elapsed * m_maximum ) / ((double)value) ;
unsigned long remaining = estimated - elapsed;
SetTimeLabel(elapsed, m_elapsed);