fix 2nd problem of #1848

This commit is contained in:
IntelOrca 2015-09-05 20:06:58 +01:00
parent c3fbdf78c0
commit 8c44ddac17
2 changed files with 3 additions and 1 deletions

View File

@ -45,7 +45,7 @@
#include "world/water.h"
static char _scenarioPath[MAX_PATH];
static const char *_scenarioFileName;
static const char *_scenarioFileName = "";
char gScenarioSaveName[MAX_PATH];
int gFirstTimeSave = 1;

View File

@ -801,6 +801,7 @@ static void window_loadsave_select(rct_window *w, const char *path)
case (LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE) :
rw = SDL_RWFromFile(path, "wb+");
if (rw != NULL) {
scenario_set_filename(path);
int success = scenario_save(rw, gConfigGeneral.save_plugin_data ? 3 : 2);
SDL_RWclose(rw);
if (success) {
@ -822,6 +823,7 @@ static void window_loadsave_select(rct_window *w, const char *path)
rw = SDL_RWFromFile(path, "wb+");
int success = 0;
if (rw != NULL) {
scenario_set_filename(path);
success = scenario_save(rw, gConfigGeneral.save_plugin_data ? 3 : 2);
SDL_RWclose(rw);
}