summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-06-07 11:50:03 +0200
committerraysan5 <[email protected]>2020-06-07 11:50:03 +0200
commit5d0b2c796e09ab4adc09bc2fb68a7a5d3e51a911 (patch)
tree41e5d0d33b631a78222ebf9b9fccb267ea9d6914 /src/core.c
parent992fefa823809aa4dff0170d3dcd3930a2cce52a (diff)
downloadraylib-5d0b2c796e09ab4adc09bc2fb68a7a5d3e51a911.tar.gz
raylib-5d0b2c796e09ab4adc09bc2fb68a7a5d3e51a911.zip
Remove warning from GetDirectoryPath()
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index c50cd559..bb29c2b9 100644
--- a/src/core.c
+++ b/src/core.c
@@ -2111,7 +2111,7 @@ const char *GetDirectoryPath(const char *filePath)
if (lastSlash)
{
// NOTE: Be careful, strncpy() is not safe, it does not care about '\0'
- strncpy(dirPath + ((filePath[1] != ':')? 2 : 0), filePath, strlen(filePath) - (strlen(lastSlash) - 1));
+ memcpy(dirPath + ((filePath[1] != ':')? 2 : 0), filePath, strlen(filePath) - (strlen(lastSlash) - 1));
dirPath[strlen(filePath) - strlen(lastSlash) + ((filePath[1] != ':')? 2 : 0)] = '\0'; // Add '\0' manually
}