From 633681804dbb9eab614d8f87a4fd7ddf75ac794e Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:52:35 -0800 Subject: [PATCH] Actually don't dispose hawkfile stream after ReadAllBytes() fixes a30c0efb788558a4524e2e96e8d3d1396de35237 --- src/BizHawk.Common/HawkFile/HawkFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BizHawk.Common/HawkFile/HawkFile.cs b/src/BizHawk.Common/HawkFile/HawkFile.cs index 05628e7792..ee2a6d3838 100644 --- a/src/BizHawk.Common/HawkFile/HawkFile.cs +++ b/src/BizHawk.Common/HawkFile/HawkFile.cs @@ -274,7 +274,7 @@ namespace BizHawk.Common /// attempts to read all the content from the file public byte[] ReadAllBytes() { - using var stream = GetStream(); + var stream = GetStream(); using var ms = new MemoryStream((int) stream.Length); stream.CopyTo(ms); return ms.GetBuffer();