From fd76c3b8b1c9cfb98cc2e91f69502e02e86b6f12 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 7 May 2018 01:29:02 +0200 Subject: [PATCH] Change back to previous behavior --- libretro-common/file/file_path.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index 5e79dbed50..75bc3bdfb0 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -391,8 +391,9 @@ char *path_remove_extension(char *path) char *last = !string_is_empty(path) ? (char*)strrchr(path_basename(path), '.') : NULL; if (!last) - return path; - *last = '\0'; + return NULL; + if (*last) + *last = '\0'; return path; }