diff --git a/LABA1.cpp b/LABA1.cpp index f01e5bb..9371ef5 100644 --- a/LABA1.cpp +++ b/LABA1.cpp @@ -108,11 +108,12 @@ static size_t progress_callback(void* clientp, double ultotal, double ulnow) { - //struct progress* memory = (progress*)clientp; - if (!isnan((dlnow / dltotal) * 100.0)) { + if (dltotal != 0) { cerr << "Progress: " << (double)(dlnow / dltotal) * 100.0 << "%\n"; } - //cerr << "Progress: " << memory->privat << "\n"; + else { + cerr << "Progress: " << "0" << "%\n"; + } return 0; /* all is good */ }