Skip to content

Commit

Permalink
string_list_join_concat - cut down on one strlcat
Browse files Browse the repository at this point in the history
  • Loading branch information
LibretroAdmin committed Jul 17, 2023
1 parent fe1297c commit 4004927
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libretro-common/lists/string_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ void string_list_join_concat(char *buffer, size_t size,

for (i = 0; i < list->size; i++)
{
strlcat(buffer, list->elems[i].data, size);
size_t _len = strlcat(buffer, list->elems[i].data, size);
if ((i + 1) < list->size)
strlcat(buffer, delim, size);
strlcpy(buffer + _len, delim, size - _len);
}
}

Expand Down

0 comments on commit 4004927

Please sign in to comment.