File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
GeneralsMD/Code/GameEngine/Source/GameLogic/System
Generals/Code/GameEngine/Source/GameLogic/System Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -2146,19 +2146,17 @@ void GameLogic::loadMapINI( AsciiString mapName )
21462146 return ;
21472147 }
21482148
2149- char filename[_MAX_PATH];
2150- char fullFledgeFilename[_MAX_PATH];
2151-
21522149 //
21532150 // if map name begins with a "SAVE_DIRECTORY\", then the map refers to a map
21542151 // that has been extracted from a save game file ... in that case we need to get
21552152 // the pristine map name string in order to manipulate and load the right map.ini
21562153 // for that map from it's original location
21572154 //
2158- const char * pristineMapName = TheGameState->isInSaveDirectory (filename )
2155+ const char * pristineMapName = TheGameState->isInSaveDirectory (mapName. str () )
21592156 ? TheGameState->getSaveGameInfo ()->pristineMapName .str ()
21602157 : mapName.str ();
21612158
2159+ char filename[_MAX_PATH];
21622160 strlcpy (filename, pristineMapName, ARRAY_SIZE (filename));
21632161
21642162 // sanity
@@ -2175,6 +2173,7 @@ void GameLogic::loadMapINI( AsciiString mapName )
21752173 *extension = 0 ;
21762174
21772175
2176+ char fullFledgeFilename[_MAX_PATH];
21782177 sprintf (fullFledgeFilename, " %s\\ map.ini" , filename);
21792178 if (TheFileSystem->doesFileExist (fullFledgeFilename)) {
21802179 DEBUG_LOG ((" Loading map.ini" ));
Original file line number Diff line number Diff line change @@ -2463,19 +2463,17 @@ void GameLogic::loadMapINI( AsciiString mapName )
24632463 return ;
24642464 }
24652465
2466- char filename[_MAX_PATH];
2467- char fullFledgeFilename[_MAX_PATH];
2468-
24692466 //
24702467 // if map name begins with a "SAVE_DIRECTORY\", then the map refers to a map
24712468 // that has been extracted from a save game file ... in that case we need to get
24722469 // the pristine map name string in order to manipulate and load the right map.ini
24732470 // for that map from it's original location
24742471 //
2475- const char * pristineMapName = TheGameState->isInSaveDirectory (filename )
2472+ const char * pristineMapName = TheGameState->isInSaveDirectory (mapName. str () )
24762473 ? TheGameState->getSaveGameInfo ()->pristineMapName .str ()
24772474 : mapName.str ();
24782475
2476+ char filename[_MAX_PATH];
24792477 strlcpy (filename, pristineMapName, ARRAY_SIZE (filename));
24802478
24812479 // sanity
@@ -2492,6 +2490,7 @@ void GameLogic::loadMapINI( AsciiString mapName )
24922490 *extension = 0 ;
24932491
24942492
2493+ char fullFledgeFilename[_MAX_PATH];
24952494 sprintf (fullFledgeFilename, " %s\\ map.ini" , filename);
24962495 if (TheFileSystem->doesFileExist (fullFledgeFilename)) {
24972496 DEBUG_LOG ((" Loading map.ini" ));
You can’t perform that action at this time.
0 commit comments