This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9838 - Filesize > 2GB reported negative
Attached to Project:
Rockbox
Opened by Thomas Martitz (kugel.) - Tuesday, 27 January 2009, 23:38 GMT+2
Last edited by Marcin Bukat (MarcinBukat) - Sunday, 05 June 2011, 14:40 GMT+2
Opened by Thomas Martitz (kugel.) - Tuesday, 27 January 2009, 23:38 GMT+2
Last edited by Marcin Bukat (MarcinBukat) - Sunday, 05 June 2011, 14:40 GMT+2
|
DetailsMy windows 7 beta image is reported to be of a size of -937,678,848 (Rockbox file properties plugin). The correct filesize is 3,357,288,448
Besides that it's entirely wrong, being negative is weird on top. Looking through the code shows that the dircache_entry's size member is of type long, making negative values possible. Changing it to unsigned long/size_t results in the correct filesize. Compilation was warning-less. Can an expert comment on this and if the change is good and won't break anything. |
This task depends upon
Closed by Marcin Bukat (MarcinBukat)
Sunday, 05 June 2011, 14:40 GMT+2
Reason for closing: Wont Fix
Additional comments about closing: general 32bit issue
Sunday, 05 June 2011, 14:40 GMT+2
Reason for closing: Wont Fix
Additional comments about closing: general 32bit issue
I'm unsure what 64-bit compilers make of size_t vs unsigned long, however - that might favour size_t...
amiconn however said, that filesize must me signed.
http://www.rockbox.org/irc/log-20090127#23:45:10