From bcc26183fac43282104c6e22ba4480311ff5ed14 Mon Sep 17 00:00:00 2001 From: oblerion <82583559+oblerion@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:11:47 +0100 Subject: [PATCH] Update rcore.c --- src/rcore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index 1d004372e..f21ec2f59 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -1948,14 +1948,15 @@ const char *GetFileNameWithoutExt(const char *filePath) { if (filePath != NULL) { - const char *fileName = GetFileName(filePath); // Get filename without path - for (int i = (int)strlen(fileName); i>0; i--) // Reverse search + const char *fileName = GetFileName(filePath); // Get filename.ext without path + for (int i = (int)strlen(fileName); i>0; i--) // Reverse search '.' { if (fileName[i] == '.') { return TextSubtext(fileName,0,i); } } + return fileName; // Extension not found } return "\0"; }