bugfix - only read by file open

This commit is contained in:
ikpil 2023-03-27 11:00:19 +09:00
parent 57183f8bda
commit 7e71bf35fa
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ namespace DotRecast.Core
public static byte[] ToBytes(string filename) public static byte[] ToBytes(string filename)
{ {
var filepath = ToRPath(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]; byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length); fs.Read(buffer, 0, buffer.Length);