From 40049274b2bfee3554c399ecf5296d340129ac2a Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Mon, 17 Jul 2023 10:33:01 +0200 Subject: [PATCH] string_list_join_concat - cut down on one strlcat --- libretro-common/lists/string_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretro-common/lists/string_list.c b/libretro-common/lists/string_list.c index 1d485ac3214..6a3de7b80e5 100644 --- a/libretro-common/lists/string_list.c +++ b/libretro-common/lists/string_list.c @@ -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); } }