Merge pull request #8252 from Mailaender/legacy-map-dispose-stream
Fixed missing dispose on stream in LegacyMapImporter
This commit is contained in:
@@ -132,7 +132,9 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
|
||||
public void ConvertIniMap(string iniFile)
|
||||
{
|
||||
var file = new IniFile(GlobalFileSystem.Open(iniFile));
|
||||
using (var stream = GlobalFileSystem.Open(iniFile))
|
||||
{
|
||||
var file = new IniFile(stream);
|
||||
var basic = file.GetSection("Basic");
|
||||
var mapSection = file.GetSection("Map");
|
||||
var legacyMapFormat = (IniMapFormat)Exts.ParseIntegerInvariant(basic.GetValue("NewINIFormat", "0"));
|
||||
@@ -214,6 +216,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
LoadPlayer(file, p, legacyMapFormat == IniMapFormat.RedAlert);
|
||||
map.PlayerDefinitions = mapPlayers.ToMiniYaml();
|
||||
}
|
||||
}
|
||||
|
||||
static int2 LocationFromMapOffset(int offset, int mapSize)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user