Fix FS#7490 (%px tag causes divide by zero errors).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14018 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nicolas Pennequin 2007-07-27 02:04:40 +00:00
parent b7ea98f0ea
commit 5e8dad8dfa

View file

@ -849,6 +849,9 @@ static char *get_token_value(struct gui_wps *gwps,
return buf;
case WPS_TOKEN_TRACK_ELAPSED_PERCENT:
if (id3->length <= 0)
return NULL;
if (intval)
{
*intval = limit * (id3->elapsed + state->ff_rewind_count)