overflow fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-03-04 12:09:01 +00:00
parent 3c969e8f7a
commit 7d0b9dea9b

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);