1
0
Fork 0
forked from len0rd/rockbox

Allow 'long' labels with single-argument %xd too. The label need to be at least 3 chars long (2 chars are treated as a single-letter-label image with a subimage).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27820 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Magnus Holmgren 2010-08-15 07:08:23 +00:00
parent b413169b2e
commit ac2c69ccae

View file

@ -228,14 +228,15 @@ static int parse_image_display(struct skin_element *element,
struct wps_data *wps_data)
{
char *label = element->params[0].data.text;
char sublabel = label[1];
char sublabel = '\0';
int subimage;
struct gui_img *img;
struct image_display *id = skin_buffer_alloc(sizeof(struct image_display));
if (element->params_count == 1)
if (element->params_count == 1 && strlen(label) <= 2)
{
/* backwards compatability. Allow %xd(Aa) to still work */
sublabel = label[1];
label[1] = '\0';
}
/* sanity check */