From 3b8b272a8f26aaff2510c5f7cff6ba71424184a4 Mon Sep 17 00:00:00 2001 From: teru Date: Sun, 7 Mar 2010 13:39:19 +0000 Subject: [PATCH] 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". git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25054 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_tokens.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 486a2efc7..2cd5aaece 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -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; -- 2.11.4.GIT