mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Merge pull request #5038 from RobLoach/patch-11
[DB] Update RDB building to ignore missing keys
This commit is contained in:
commit
c7036b24d4
@ -527,23 +527,27 @@ static dat_converter_list_t* dat_converter_parser(
|
|||||||
if (match_key)
|
if (match_key)
|
||||||
{
|
{
|
||||||
map.key = dat_converter_get_match(map.value.list, match_key);
|
map.key = dat_converter_get_match(map.value.list, match_key);
|
||||||
|
// If the key is not found, report, and mark it to be skipped.
|
||||||
if (!map.key)
|
if (!map.key)
|
||||||
{
|
{
|
||||||
printf("missing match key '");
|
printf("Missing match key '");
|
||||||
while (match_key->next)
|
while (match_key->next)
|
||||||
{
|
{
|
||||||
printf("%s.", match_key->value);
|
printf("%s.", match_key->value);
|
||||||
match_key = match_key->next;
|
match_key = match_key->next;
|
||||||
}
|
}
|
||||||
printf("%s' in one of the entries\n", match_key->value);
|
printf("%s' on line %d\n", match_key->value, current->token.line_no);
|
||||||
dat_converter_exit(1);
|
skip = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
map.key = NULL;
|
map.key = NULL;
|
||||||
|
|
||||||
dat_converter_list_append(target, &map);
|
// If we are still not to skip the entry, append it to the list.
|
||||||
skip = true;
|
if (!skip) {
|
||||||
|
dat_converter_list_append(target, &map);
|
||||||
|
skip = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dat_converter_list_free(map.value.list);
|
dat_converter_list_free(map.value.list);
|
||||||
@ -833,4 +837,3 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user