diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-03-04 08:19:38 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-03-04 08:19:38 +0000 |
commit | 6e6bc3b681f77d70d8133e7ee728d2f480585e95 (patch) | |
tree | e3ee5ac5cbb337cf376c0872078746b912ca9618 /cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp | |
parent | The SSL plug-in no longer caches the logger. (diff) | |
download | ice-6e6bc3b681f77d70d8133e7ee728d2f480585e95.tar.bz2 ice-6e6bc3b681f77d70d8133e7ee728d2f480585e95.tar.xz ice-6e6bc3b681f77d70d8133e7ee728d2f480585e95.zip |
http://www.zeroc.com/bugzilla/show_bug.cgi?id=89
Diffstat (limited to 'cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp')
-rwxr-xr-x | cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp b/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp index 83b381ca661..f3b02d65ca4 100755 --- a/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp +++ b/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp @@ -203,7 +203,11 @@ CPatchDlg::patchProgress(Ice::Long, Ice::Long, Ice::Long totalProgress, Ice::Lon _speed->SetWindowText(speed); } - int pcnt = static_cast<int>(totalProgress * 100 / totalSize); + int pcnt = 100; + if(totalSize > 0) + { + pcnt = static_cast<int>(totalProgress * 100 / totalSize); + } CString percent; percent.Format("%d%%", pcnt); _percent->SetWindowText(percent); |