[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pnet-developers] [bugs #12048] cscc hangs for some switch statement
From: |
mboss |
Subject: |
Re: [Pnet-developers] [bugs #12048] cscc hangs for some switch statements |
Date: |
Tue, 22 Feb 2005 22:21:42 +0100 |
User-agent: |
KMail/1.6.2 |
On Tuesday 22 February 2005 09:50, Gopal.V wrote:
> the 80% calculations in switch was failing due to overflow.
> Fixed with :
>
> - if(((range * 80) / 100) <= numValues)
> + if(((range * 4) / 5) <= numValues && range < 0x1fffffff)
to make it bullet-proof I suggest to put division before multiplication:
if ( (range / 5 * 4) <= numValues && range < 0x1fffffff )
ciao,
Marco