forked from bit/DotRecastNetSim
bugfix - only read by file open
This commit is contained in:
parent
57183f8bda
commit
7e71bf35fa
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue