diff --git a/src/core.c b/src/core.c index 1107d332..db7b6615 100644 --- a/src/core.c +++ b/src/core.c @@ -2059,9 +2059,9 @@ const char *GetWorkingDirectory(void) static char currentDir[MAX_FILEPATH_LENGTH]; memset(currentDir, 0, MAX_FILEPATH_LENGTH); - GETCWD(currentDir, MAX_FILEPATH_LENGTH - 1); + char *ptr = GETCWD(currentDir, MAX_FILEPATH_LENGTH - 1); - return currentDir; + return ptr; } // Get filenames in a directory path (max 512 files)