mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-06 21:25:03 -05:00
checkwps: Validate %?St() tags
This will bail if referenced setting name does not exist. Change-Id: I7abd54ec1260d3da6024ebec809f8e270b0a84e5
This commit is contained in:
parent
d57e1a21d1
commit
d7d7627baf
6 changed files with 91 additions and 22 deletions
|
|
@ -829,19 +829,12 @@ static int parse_setting_and_lang(struct skin_element *element,
|
|||
}
|
||||
else
|
||||
{
|
||||
/* NOTE: The string validations that happen here will
|
||||
* automatically PASS on checkwps because its too hard to get
|
||||
* settings_list.c built for a specific target.
|
||||
* If that ever changes remove the #ifndef __PCTOOL__ here
|
||||
*/
|
||||
#ifndef __PCTOOL__
|
||||
const struct settings_list *setting = find_setting_by_cfgname(temp);
|
||||
if (!setting) {
|
||||
DEBUGF("Invalid setting [%s]\n", temp);
|
||||
return WPS_ERROR_INVALID_PARAM;
|
||||
}
|
||||
token->value.xdata = (void *)setting;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue