From bcc4418ff05fa0e06c1a539bcbbc3a5c62b3751a Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 2 Mar 2021 01:07:08 +0100 Subject: REVIEWED: GetFileExtension() to include the dot #1523 --- src/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core.c') diff --git a/src/core.c b/src/core.c index 78a21cc5..d55bcf3d 100644 --- a/src/core.c +++ b/src/core.c @@ -2351,14 +2351,14 @@ bool DirectoryExists(const char *dirPath) return result; } -// Get pointer to extension for a filename string +// Get pointer to extension for a filename string (includes the dot: .png) const char *GetFileExtension(const char *fileName) { const char *dot = strrchr(fileName, '.'); if (!dot || dot == fileName) return NULL; - return (dot + 1); + return dot; } // String pointer reverse break: returns right-most occurrence of charset in s -- cgit v1.2.3