FS#8967 - Database - negative autoscore

Attached to Project: Rockbox
Opened by PaulJam (PaulJam) - Tuesday, 06 May 2008, 00:04 GMT
Last edited by amaury pouly (pamaury) - Tuesday, 02 February 2010, 20:53 GMT
Task Type Bugs
Category Database
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



i noticed that some of my songs have a negative autoscore in the database.
There seems to be an overflow in the autoscore calculation when the playtime exceeds a certain value (propably (2^31)/100).

Here is the code where the overflow seems to happen (the multiplication of the playtime with 100).
apps/tagcache.c, line 794 and following:

data = 100 * idx->tag_seek[tag_playtime]
/ idx->tag_seek[tag_length]
/ idx->tag_seek[tag_playcount];

H300 with r17393
This task depends upon

Closed by  amaury pouly (pamaury)
Tuesday, 02 February 2010, 20:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  r24471