From 44a52b46173dfa5696be53fd12d3214036729459 Mon Sep 17 00:00:00 2001 From: sonninnos <45124675+sonninnos@users.noreply.github.com> Date: Mon, 20 Jun 2022 19:07:46 +0300 Subject: [PATCH] Better Disc Control append focus (#14075) --- menu/cbs/menu_cbs_ok.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 684bdf96ec..6a6d04cbf1 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1157,11 +1157,10 @@ int generic_action_ok_displaylist_push(const char *path, path_content[0] = '\0'; strlcpy(path_content, path_get(RARCH_PATH_CONTENT), sizeof(path_content)); /* Remove archive browsed file from the path */ - if (strstr(path_content, "#")) { - char *token = strtok(path_content, "#"); - while (token != NULL) - token = strtok(NULL, "#"); + char *delim = (char*)strchr(path_content, '#'); + if (delim) + *delim = '\0'; } menu_driver_set_pending_selection(path_basename(path_content)); }