Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2146,19 +2146,17 @@ void GameLogic::loadMapINI( AsciiString mapName )
return;
}

char filename[_MAX_PATH];
char fullFledgeFilename[_MAX_PATH];

//
// if map name begins with a "SAVE_DIRECTORY\", then the map refers to a map
// that has been extracted from a save game file ... in that case we need to get
// the pristine map name string in order to manipulate and load the right map.ini
// for that map from it's original location
//
const char* pristineMapName = TheGameState->isInSaveDirectory(filename)
const char* pristineMapName = TheGameState->isInSaveDirectory(mapName.str())
? TheGameState->getSaveGameInfo()->pristineMapName.str()
: mapName.str();

char filename[_MAX_PATH];
strlcpy(filename, pristineMapName, ARRAY_SIZE(filename));

// sanity
Expand All @@ -2175,6 +2173,7 @@ void GameLogic::loadMapINI( AsciiString mapName )
*extension = 0;


char fullFledgeFilename[_MAX_PATH];
sprintf(fullFledgeFilename, "%s\\map.ini", filename);
if (TheFileSystem->doesFileExist(fullFledgeFilename)) {
DEBUG_LOG(("Loading map.ini"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2463,19 +2463,17 @@ void GameLogic::loadMapINI( AsciiString mapName )
return;
}

char filename[_MAX_PATH];
char fullFledgeFilename[_MAX_PATH];

//
// if map name begins with a "SAVE_DIRECTORY\", then the map refers to a map
// that has been extracted from a save game file ... in that case we need to get
// the pristine map name string in order to manipulate and load the right map.ini
// for that map from it's original location
//
const char* pristineMapName = TheGameState->isInSaveDirectory(filename)
const char* pristineMapName = TheGameState->isInSaveDirectory(mapName.str())
? TheGameState->getSaveGameInfo()->pristineMapName.str()
: mapName.str();

char filename[_MAX_PATH];
strlcpy(filename, pristineMapName, ARRAY_SIZE(filename));

// sanity
Expand All @@ -2492,6 +2490,7 @@ void GameLogic::loadMapINI( AsciiString mapName )
*extension = 0;


char fullFledgeFilename[_MAX_PATH];
sprintf(fullFledgeFilename, "%s\\map.ini", filename);
if (TheFileSystem->doesFileExist(fullFledgeFilename)) {
DEBUG_LOG(("Loading map.ini"));
Expand Down
Loading