core_info_get_display_name - use config_file_new_from_string

This commit is contained in:
twinaphex 2019-07-18 00:43:03 +02:00
parent 41481dfc73
commit a465971556

View File

@ -923,8 +923,16 @@ bool core_info_list_get_display_name(core_info_list_t *core_info_list,
bool core_info_get_display_name(const char *path, char *s, size_t len)
{
char *tmp = NULL;
config_file_t *conf = config_file_new(path);
int64_t length = 0;
char *tmp = NULL;
config_file_t *conf = NULL;
uint8_t *ret_buf = NULL;
if (filestream_read_file(path, (void**)&ret_buf, &length))
{
if (length >= 0)
conf = config_file_new_from_string((const char*)ret_buf);
free((void*)ret_buf);
}
if (!conf)
return false;