From 07f13876fc12aa634f44678b8b6e293e7b8572f0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 1 Jan 2018 20:17:41 +0100 Subject: [PATCH] Fix playlist issues with extract_value - the name of the last playlist entry in history list was being reused for the next playlist entry --- libretro-common/file/config_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretro-common/file/config_file.c b/libretro-common/file/config_file.c index 692176b76a..af22bf753a 100644 --- a/libretro-common/file/config_file.c +++ b/libretro-common/file/config_file.c @@ -142,14 +142,14 @@ static char *extract_value(char *line, bool is_value) { line++; if (*line == '"') - return strdup(""); + return NULL; tok = strtok_r(line, "\"", &save); } /* We don't have that. Read until next space. */ else if (*line != '\0') /* Nothing */ tok = strtok_r(line, " \n\t\f\r\v", &save); - if (tok) + if (tok && *tok) return strdup(tok); return NULL; }