hicklemr / rtgui

Automatically exported from code.google.com/p/rtgui
0 stars 1 forks source link

Large numbers show as negative #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Large file sizes are showing as negative (e.g. a 2444.9 MB torrent shows as
-1,914,828,334 b).

Easy fix though: in the first line of format_bytes() put
$bytes = sprintf('%u',$bytes);

This forces $bytes to be unsigned.

Great front-end, cheers.

Original issue reported on code.google.com by dan.deebster on 30 Aug 2008 at 12:30

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Not so fast...  Doing this in format_bytes() does break at least one thing: my 
free
space display went from 557.6 gig to 1.6 gig.

Original comment by dan.deebster on 31 Aug 2008 at 5:25

GoogleCodeExporter commented 8 years ago
if (!is_float($bytes)) $bytes = sprintf('%u',$bytes);
works, but it's starting to get a bit hacky...

Original comment by dan.deebster on 31 Aug 2008 at 6:16

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I can confirm this is an issue.  The fixes posted here don't work properly for 
me
though, it leads to:

the size reading as "16.0" for large sizes
the remaining is completely wrong
the done percentage remains negative

I believe this is a duplicate of Bug 1
(http://code.google.com/p/rtgui/issues/detail?id=1&can=1)

Original comment by andrew.r...@gmail.com on 21 Sep 2008 at 10:24

GoogleCodeExporter commented 8 years ago
It's a duplicate of bug #1 if this applies to torrent sizes or sizes which are 
fetched from any xmlrpc functions.

Check that your xmlrpc-c library version is equal or newer than 1.10.0 -- if 
not, 
upgrade and recompile libtorrent/rtorrent with it.

Original comment by user00...@gmail.com on 19 Oct 2008 at 6:26

GoogleCodeExporter commented 8 years ago
How do i check the version of xlmrpc-c library?

Original comment by k.tony.j...@gmail.com on 6 Nov 2008 at 7:41

GoogleCodeExporter commented 8 years ago

Original comment by lemonbe...@gmail.com on 5 Dec 2008 at 10:28