diff --git a/src/osinterface.c b/src/osinterface.c index 38f30a3cb1..9ca7b440ee 100644 --- a/src/osinterface.c +++ b/src/osinterface.c @@ -390,7 +390,8 @@ char* osinterface_open_directory_browser(char *title) { // Copy the path directory to the buffer if (SHGetPathFromIDList(pidl, pszBuffer)) { // Store pszBuffer (and the path) in the outPath - outPath = strcat("", pszBuffer); + outPath = (char*) malloc(strlen(pszBuffer)+1); + strcpy(outPath, pszBuffer); } } CoUninitialize(); diff --git a/src/rct2.c b/src/rct2.c index 90674252b7..77a58473d6 100644 --- a/src/rct2.c +++ b/src/rct2.c @@ -182,7 +182,7 @@ void rct2_startup_checks() { // check if game is already running - RCT2_CALLPROC(0x00674C0B); + RCT2_CALLPROC_EBPSAFE(0x00674C0B); } void rct2_update()