From 872f4521a0644bdeb18ccfda0797f9b83d2033a5 Mon Sep 17 00:00:00 2001 From: anyc Date: Mon, 19 May 2014 21:43:34 +0200 Subject: [PATCH] fixed strcat and rct2_startup_checks() --- src/osinterface.c | 3 ++- src/rct2.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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()