mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-06 21:25:03 -05:00
Bugfix FS#13696 - ID3 year with substring cause panic
The issue was the false case returning NULL for children elements instead just ignore the false branch for everything but SKIN_TOKEN_SUBLINE_TIMEOUT_HIDE Change-Id: Ie0f4f51646faf116e563ab7e60d52d18759f4220
This commit is contained in:
parent
936482abb5
commit
4e4af2fe96
1 changed files with 7 additions and 4 deletions
|
|
@ -624,7 +624,7 @@ static bool skin_render_line(struct skin_element* line, struct skin_draw_info *i
|
||||||
static int get_subline_timeout(struct gui_wps *gwps, struct skin_element* line)
|
static int get_subline_timeout(struct gui_wps *gwps, struct skin_element* line)
|
||||||
{
|
{
|
||||||
struct skin_element *element=line;
|
struct skin_element *element=line;
|
||||||
struct wps_token *token;
|
struct wps_token *token = NULL;
|
||||||
int retval = DEFAULT_SUBLINE_TIME_MULTIPLIER*TIMEOUT_UNIT;
|
int retval = DEFAULT_SUBLINE_TIME_MULTIPLIER*TIMEOUT_UNIT;
|
||||||
if (element->type == LINE)
|
if (element->type == LINE)
|
||||||
{
|
{
|
||||||
|
|
@ -662,10 +662,13 @@ static int get_subline_timeout(struct gui_wps *gwps, struct skin_element* line)
|
||||||
struct conditional *conditional = SKINOFFSETTOPTR(skin_buffer, element->data);
|
struct conditional *conditional = SKINOFFSETTOPTR(skin_buffer, element->data);
|
||||||
int val = evaluate_conditional(gwps, 0, conditional, element->children_count);
|
int val = evaluate_conditional(gwps, 0, conditional, element->children_count);
|
||||||
|
|
||||||
|
if (val >= 0 || (token && token->type == SKIN_TOKEN_SUBLINE_TIMEOUT_HIDE))
|
||||||
|
{/* only need tmoval in false case if SKIN_TOKEN_SUBLINE_TIMEOUT_HIDE */
|
||||||
int tmoval = get_subline_timeout(gwps, get_child(element->children, val));
|
int tmoval = get_subline_timeout(gwps, get_child(element->children, val));
|
||||||
if (tmoval >= 0)
|
if (tmoval >= 0)
|
||||||
return MAX(retval, tmoval); /* Bugfix %t()%?CONDITIONAL tmo ignored */
|
return MAX(retval, tmoval); /* Bugfix %t()%?CONDITIONAL tmo ignored */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (type == COMMENT)
|
else if (type == COMMENT)
|
||||||
{
|
{
|
||||||
retval = 0; /* don't display this item */
|
retval = 0; /* don't display this item */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue