mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-01-13 15:27:59 +03:00
Properly leave open streams when saving to them for GeneratedMap and LandData instances.
This commit is contained in:
parent
ad2a7c79e1
commit
fabc3e98b2
@ -57,7 +57,7 @@ namespace Syroot.Worms.Armageddon
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void Save(Stream stream)
|
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);
|
writer.WriteStruct(Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ namespace Syroot.Worms.Armageddon
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void Save(Stream stream)
|
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.
|
// Write the header.
|
||||||
writer.Write(_signature);
|
writer.Write(_signature);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user