Update RDB building to ignore missing keys
This change makes it so that when building the RDB files, the entries that are missing `serial` keys will simply be ignored and the RDB file will still build. When it's missing the key, it also logs which line it's processing so that we can easily fix the broken entry in libretro-database.
This commit is contained in:
parent
0dd2304e7c
commit
11f8938f7e
|
@ -527,24 +527,28 @@ static dat_converter_list_t* dat_converter_parser(
|
|||
if (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)
|
||||
{
|
||||
printf("missing match key '");
|
||||
printf("Missing match key '");
|
||||
while (match_key->next)
|
||||
{
|
||||
printf("%s.", match_key->value);
|
||||
match_key = match_key->next;
|
||||
}
|
||||
printf("%s' in one of the entries\n", match_key->value);
|
||||
dat_converter_exit(1);
|
||||
printf("%s' on line %d\n", match_key->value, current->token.line_no);
|
||||
skip = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
map.key = NULL;
|
||||
|
||||
// If we are still not to skip the entry, append it to the list.
|
||||
if (!skip) {
|
||||
dat_converter_list_append(target, &map);
|
||||
skip = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
dat_converter_list_free(map.value.list);
|
||||
|
||||
|
@ -833,4 +837,3 @@ int main(int argc, char** argv)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue