View Single Post
Posts: 39 | Thanked: 2 times | Joined on Dec 2005
#123
Originally Posted by RussNelson
I'd believe that:

gdouble fraction = running_total * sqrt(num_sats_used)
/ num_sats_used / 100.0;

What if num_sats_used is zero?
Then the answer will be 0, if you turn it around then it will "divison by zero"and it will crash.

EDIT: didn't look close enough... yes it will crash if num_sats_used is 0.

Sorry

EDIT2: have to blame it on the early morning... need coffe...

Last edited by HardCoder; 2006-05-19 at 06:17.