summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-03-02 01:07:08 +0100
committerRay <[email protected]>2021-03-02 01:07:08 +0100
commitbcc4418ff05fa0e06c1a539bcbbc3a5c62b3751a (patch)
tree46faff440f4c6d35cc33b1bc8084aa17f71ca9fe /src/core.c
parent2ff5fa73e9a4745aa1cc37a4e5be05c841778200 (diff)
downloadraylib-bcc4418ff05fa0e06c1a539bcbbc3a5c62b3751a.tar.gz
raylib-bcc4418ff05fa0e06c1a539bcbbc3a5c62b3751a.zip
REVIEWED: GetFileExtension() to include the dot #1523
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c4
1 files changed, 2 insertions, 2 deletions
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