On 2 May 2004, Bill Pringlemeir wrote:

>
> On Sun, 2 May 2004, [EMAIL PROTECTED] wrote:
>
>> The public CVS is always horribly out of date - expect at least a
>> 24hrs propagation delay. The problem was fixed 1.13, so it's no
>> wonder you still experience the crashes. Try again, once you have
>> rev. 1.13. There are also CVS snaphshots which are updated every 6
>> hrs.
>
> Hmmm?  I learned that already.  There was a comment in 1.12 that
> said the bug was fixed... Sorry got it.

That was me thinking that the issue was that file_size was 0, but the
crash was related to file_size being small.

> revision 1.13 date: 2004/05/01 20:39:56; author: graaff; state: Exp;
> lines: +14 -10 Rewrite bits to pixels calculation to avoid underflow
> errors with small file sizes.

The trick was to rewrite the calculation so that the multiplication
goes first. That only requires one division (by file_size) and thus
avoids the underflow situation. It requires a cast to float to get
that to work because the guint32 isn't large enough to hold the
intermediate results.

Kind regards,

Hans


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to