From f1bcc31b9cdde3b6a372811f711eab516873fd53 Mon Sep 17 00:00:00 2001 From: GordiyevskikDA Date: Sat, 25 May 2024 13:30:25 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B2=D1=8B=D0=BF=D0=BE=D0=BB=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BA=D0=BE=D0=B4=20=D0=B4=D0=BB=D1=8F=20=D0=B2?= =?UTF-8?q?=D0=B0=D1=80=D0=B8=D0=B0=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LABA1.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 */ }