From a465971556d288a21e46ac45d9ac66a082a02a4f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 18 Jul 2019 00:43:03 +0200 Subject: [PATCH] core_info_get_display_name - use config_file_new_from_string --- core_info.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core_info.c b/core_info.c index 17203c38ae..5dcd179e99 100644 --- a/core_info.c +++ b/core_info.c @@ -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;