[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KNode: division by zero is bad
From: Waldo Bastian <bastian () kde ! org>
Date: 2000-08-15 5:02:11
[Download RAW message or body]
Added to CVS. (I changed the test to predictedLines > 0)
Matthias, can you move the tag for this one?
Cheers,
Waldo
On Mon, 14 Aug 2000, Christian Gebauer wrote:
> Hi,
>
> predictedLines can equal zero, for example when
> a server has no groups.
>
> Index: knprotocolclient.cpp
> ===================================================================
> RCS file: /home/kde/kdenetwork/knode/knprotocolclient.cpp,v
> retrieving revision 1.12
> diff -u -3 -p -r1.12 knprotocolclient.cpp
> --- knprotocolclient.cpp 2000/08/08 01:06:03 1.12
> +++ knprotocolclient.cpp 2000/08/15 01:14:08
> @@ -367,7 +367,7 @@ bool KNProtocolClient::getNextLine()
>
> } while (!(nextLine = strstr(thisLine,"\r\n")));
>
> - if (predictedLines != -1)
> + if ((predictedLines != -1) && (predictedLines != 0))
> progressValue = 100 + (doneLines*900/predictedLines);
> sendSignal(TSprogressUpdate);
>
> @@ -676,7 +676,7 @@ bool KNProtocolClient::sendStr(const QCS
> }
> byteCount += ret;
> }
> - if (predictedLines != -1)
> + if ((predictedLines != -1) && (predictedLines != 0))
> progressValue = 100 + (doneLines/predictedLines)*900;
> sendSignal(TSprogressUpdate);
> return true;
>
> Christian
--
Make way, KDE/Linux is coming to a desktop near you!
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic