diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-01-09 10:08:38 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-09 08:30:48 -0700 |
commit | 621df3bc632054573f910449678525c01d6de81d (patch) | |
tree | e09c667f7db1d2b10fd87cb7dff61ff94056702a /src/gui | |
parent | a001775f8b0b992cc7c4c5863722d02e8606b175 (diff) | |
download | mana-client-621df3bc632054573f910449678525c01d6de81d.tar.gz mana-client-621df3bc632054573f910449678525c01d6de81d.tar.bz2 mana-client-621df3bc632054573f910449678525c01d6de81d.tar.xz mana-client-621df3bc632054573f910449678525c01d6de81d.zip |
Fixed nonsensical percent values in update dialog.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/updatewindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index 72cbb34a..2c15037c 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -225,8 +225,9 @@ int UpdaterWindow::updateProgress(void *ptr, float progress = dn / dt; UpdaterWindow *uw = reinterpret_cast<UpdaterWindow *>(ptr); - if (progress < 0) progress = 0.0f; - if (progress > 1) progress = 1.0f; + if(progress != progress) progress = 0.0f; // check for NaN + if (progress < 0.0f) progress = 0.0f; // no idea how this could ever happen, but why not check for it anyway. + if (progress > 1.0f) progress = 1.0f; uw->setLabel( uw->mCurrentFile + " (" + toString((int) (progress * 100)) + "%)"); |