From 7e71bf35fadc6652557a1ae74526dacafaf2bd14 Mon Sep 17 00:00:00 2001 From: ikpil Date: Mon, 27 Mar 2023 11:00:19 +0900 Subject: [PATCH] bugfix - only read by file open --- src/DotRecast.Core/Loader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DotRecast.Core/Loader.cs b/src/DotRecast.Core/Loader.cs index d97ac45..67d6fdc 100644 --- a/src/DotRecast.Core/Loader.cs +++ b/src/DotRecast.Core/Loader.cs @@ -7,7 +7,7 @@ namespace DotRecast.Core public static byte[] ToBytes(string filename) { var filepath = ToRPath(filename); - using var fs = new FileStream(filepath, FileMode.Open); + using var fs = new FileStream(filepath, FileMode.Open, FileAccess.Read); byte[] buffer = new byte[fs.Length]; fs.Read(buffer, 0, buffer.Length);