1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 06:23:04 +01:00

Fixed returning pointer from a local buffer

This commit is contained in:
atmaxinger
2014-05-26 09:27:54 +02:00
parent 07128831fb
commit 35ff9a510d
3 changed files with 10 additions and 5 deletions

View File

@@ -431,7 +431,8 @@ char* osinterface_open_directory_browser(char *title) {
char* osinterface_get_orct2_homefolder()
{
char path[260]="";
char *path;
path = malloc(sizeof(char) * MAX_PATH);
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PERSONAL | CSIDL_FLAG_CREATE, NULL, 0, path))) { // find home folder
strcat(path, "\\OpenRCT2");