Slightly change how %Li works when used as a conditional. last part is selected if and only if icon is not presented (i.e. is no icon) so that it can be used like true/false type conditional tag, e.g. "%?Li<Icon|No Icon>".

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25054 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Teruaki Kawashima 2010-03-07 13:39:19 +00:00
parent f50885534e
commit ce92b8bf34

View file

@ -418,7 +418,7 @@ const char *get_token_value(struct gui_wps *gwps,
return (char*)token->value.data;
case WPS_TOKEN_LIST_TITLE_ICON:
if (intval)
*intval = token->value.i;
*intval = MIN(token->value.i, limit-1);
snprintf(buf, buf_size, "%d", token->value.i);
return buf;