mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Some string cleanups
This commit is contained in:
parent
51e706007b
commit
700b13654c
@ -8384,10 +8384,11 @@ unsigned menu_displaylist_build_list(
|
|||||||
|
|
||||||
for (i = 0; i < num_cheats; i++)
|
for (i = 0; i < num_cheats; i++)
|
||||||
{
|
{
|
||||||
|
size_t new_len = _len;
|
||||||
const char *cheat_description = cheat_manager_get_desc(i);
|
const char *cheat_description = cheat_manager_get_desc(i);
|
||||||
snprintf(cheat_label + _len, sizeof(cheat_label) - _len, " #%u: ", i);
|
new_len += snprintf(cheat_label + _len, sizeof(cheat_label) - _len, " #%u: ", i);
|
||||||
if (!string_is_empty(cheat_description))
|
if (!string_is_empty(cheat_description))
|
||||||
strlcat(cheat_label, cheat_description, sizeof(cheat_label));
|
strlcpy(cheat_label + new_len, cheat_description, sizeof(cheat_label) - new_len);
|
||||||
|
|
||||||
/* If a search is active, skip non-matching
|
/* If a search is active, skip non-matching
|
||||||
* entries */
|
* entries */
|
||||||
|
@ -8330,10 +8330,12 @@ static void netplay_announce(netplay_t *netplay)
|
|||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
/* TODO/FIXME - is last param OK here */
|
||||||
strlcat(buf, path_basename(subsystem->elems[i].data),
|
strlcat(buf, path_basename(subsystem->elems[i].data),
|
||||||
sizeof(host_room->gamename));
|
sizeof(host_room->gamename));
|
||||||
if (++i >= subsystem->size)
|
if (++i >= subsystem->size)
|
||||||
break;
|
break;
|
||||||
|
/* TODO/FIXME - is last param OK here */
|
||||||
strlcat(buf, "|", sizeof(host_room->gamename));
|
strlcat(buf, "|", sizeof(host_room->gamename));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -790,9 +790,7 @@ static int database_info_list_iterate_found_match(
|
|||||||
entry_path_str[0] = '\0';
|
entry_path_str[0] = '\0';
|
||||||
|
|
||||||
fill_pathname(db_playlist_base_str,
|
fill_pathname(db_playlist_base_str,
|
||||||
path_basename_nocompression(db_path), "", str_len);
|
path_basename_nocompression(db_path), ".lpl", str_len);
|
||||||
|
|
||||||
strlcat(db_playlist_base_str, ".lpl", sizeof(db_playlist_base_str));
|
|
||||||
|
|
||||||
if (!string_is_empty(_db->playlist_directory))
|
if (!string_is_empty(_db->playlist_directory))
|
||||||
fill_pathname_join_special(db_playlist_path, _db->playlist_directory,
|
fill_pathname_join_special(db_playlist_path, _db->playlist_directory,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user