From 88bdaffa875c242722cfa23ae01677e3f4336780 Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Sun, 31 Jul 2022 12:42:50 +0200 Subject: [PATCH] path_basedir_wrapper - get rid of unnecessary strlcpy --- libretro-common/file/file_path.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index ab3183a16c..2f929d32d0 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -1169,7 +1169,11 @@ void path_basedir_wrapper(char *path) if ((last = find_last_slash(path))) last[1] = '\0'; else - strlcpy(path, "." PATH_DEFAULT_SLASH(), 3); + { + path[0] = '.'; + path[1] = PATH_DEFAULT_SLASH_C(); + path[2] = '\0'; + } } #if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)