diff options
| author | raysan5 <[email protected]> | 2020-06-07 11:50:03 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2020-06-07 11:50:03 +0200 |
| commit | 5d0b2c796e09ab4adc09bc2fb68a7a5d3e51a911 (patch) | |
| tree | 41e5d0d33b631a78222ebf9b9fccb267ea9d6914 /src/core.c | |
| parent | 992fefa823809aa4dff0170d3dcd3930a2cce52a (diff) | |
| download | raylib-5d0b2c796e09ab4adc09bc2fb68a7a5d3e51a911.tar.gz raylib-5d0b2c796e09ab4adc09bc2fb68a7a5d3e51a911.zip | |
Remove warning from GetDirectoryPath()
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 } |
