summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rcore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rcore.c b/src/rcore.c
index f28aff74..85a84f59 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -1413,10 +1413,10 @@ const char *GetDirectoryPath(const char *filePath)
else
{
// NOTE: Be careful, strncpy() is not safe, it does not care about '\0'
- unsigned char *dirPathPtr = dirPath;
+ char *dirPathPtr = dirPath;
if ((filePath[1] != ':') && (filePath[0] != '\\') && (filePath[0] != '/')) dirPathPtr += 2; // Skip drive letter, "C:"
memcpy(dirPathPtr, filePath, strlen(filePath) - (strlen(lastSlash) - 1));
- dirPath[strlen(filePath) - strlen(lastSlash) + ((filePath[1] != ':') && (filePath[0] != '\\') && (filePath[0] != '/'))? 2 : 0] = '\0'; // Add '\0' manually
+ dirPath[strlen(filePath) - strlen(lastSlash) + (((filePath[1] != ':') && (filePath[0] != '\\') && (filePath[0] != '/'))? 2 : 0)] = '\0'; // Add '\0' manually
}
}