File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
GeneralsMD/Code/GameEngine/Source/GameLogic/System Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2466,16 +2466,17 @@ void GameLogic::loadMapINI( AsciiString mapName )
24662466 char filename[_MAX_PATH];
24672467 char fullFledgeFilename[_MAX_PATH];
24682468
2469- strlcpy (filename, mapName.str (), ARRAY_SIZE (filename));
2470-
24712469 //
24722470 // if map name begins with a "SAVE_DIRECTORY\", then the map refers to a map
24732471 // that has been extracted from a save game file ... in that case we need to get
24742472 // the pristine map name string in order to manipulate and load the right map.ini
24752473 // for that map from it's original location
24762474 //
2477- if (TheGameState->isInSaveDirectory (filename))
2478- strlcpy (filename, TheGameState->getSaveGameInfo ()->pristineMapName .str (), ARRAY_SIZE (filename));
2475+ const char * pristineMapName = TheGameState->isInSaveDirectory (filename)
2476+ ? TheGameState->getSaveGameInfo ()->pristineMapName .str ()
2477+ : mapName.str ();
2478+
2479+ strlcpy (filename, pristineMapName, ARRAY_SIZE (filename));
24792480
24802481 // sanity
24812482 int length = strlen (filename);
You can’t perform that action at this time.
0 commit comments