From db723df879c330e17a848d36d2a9ce67fa47098b Mon Sep 17 00:00:00 2001 From: LazyBumHorse Date: Sun, 22 Sep 2019 16:29:39 +0200 Subject: [PATCH] fix path_relative_to --- libretro-common/file/file_path.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index 8548b54a7f..9144c10ce1 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -913,15 +913,8 @@ size_t path_relative_to(char *out, /* Each segment of base turns into ".." */ out[0] = '\0'; for (i = 0; trimmed_base[i]; i++) - { if (trimmed_base[i] == path_default_slash_c()) - { - out[written++] = '.'; - out[written++] = '.'; - out[written++] = path_default_slash_c(); - out[written++] = '\0'; - } - } + STRLCAT_CONST_INCR(out, written, ".." path_default_slash(), size); return strlcat(out, trimmed_path, size); }