Properly leave open streams when saving to them for GeneratedMap and LandData instances.

This commit is contained in:
Ray Koopa 2020-06-27 16:57:39 +02:00
parent ad2a7c79e1
commit fabc3e98b2
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ namespace Syroot.Worms.Armageddon
/// <inheritdoc/>
public void Save(Stream stream)
{
using BinaryStream writer = new BinaryStream(stream, encoding: Encoding.ASCII);
using BinaryStream writer = new BinaryStream(stream, encoding: Encoding.ASCII, leaveOpen: true);
writer.WriteStruct(Settings);
}

View File

@ -129,7 +129,7 @@ namespace Syroot.Worms.Armageddon
/// <inheritdoc/>
public void Save(Stream stream)
{
using BinaryStream writer = new BinaryStream(stream, encoding: Encoding.ASCII);
using BinaryStream writer = new BinaryStream(stream, encoding: Encoding.ASCII, leaveOpen: true);
// Write the header.
writer.Write(_signature);