Skip to content

Commit

Permalink
action_get_Title_generic - fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
LibretroAdmin committed Dec 31, 2024
1 parent 20ec0c6 commit 4e5df03
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions menu/cbs/menu_cbs_title.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,15 +817,12 @@ static int action_get_title_generic(char *s, size_t len,

if ((tok = strtok_r(path_cpy, "|", &save)))
{
size_t _len;
char elem0_path[NAME_MAX_LENGTH];
fill_pathname(elem0_path, path_basename(tok), "",
sizeof(elem0_path));
_len = strlcpy(s, text, len);
s[ _len] = ':';
s[++_len] = ' ';
s[++_len] = '\0';
strlcpy(s + _len, elem0_path, len - _len);
size_t _len = strlcpy(s, text, len);
s[ _len] = ':';
s[++_len] = ' ';
s[++_len] = '\0';
fill_pathname(s + _len, path_basename(tok), "",
len - _len);
free(path_cpy);
return 0;
}
Expand Down

0 comments on commit 4e5df03

Please sign in to comment.