mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 05:35:34 +08:00
Update BinaryStream.cs
This commit is contained in:
parent
6eae25b574
commit
4a16bb3e9e
@ -170,14 +170,14 @@ namespace GameRes
|
||||
return bin;
|
||||
}
|
||||
|
||||
internal int FindEoS(int start, int length, Encoding enc)
|
||||
internal int FindEoS (int start, int length, Encoding enc)
|
||||
{
|
||||
int eos_pos = -1;
|
||||
if (enc.IsUtf16())
|
||||
{
|
||||
for (int i = start + 1; i < start + length; i += 2)
|
||||
for (int i = start+1; i < start+length; i += 2)
|
||||
{
|
||||
if (m_buffer[i - 1] == 0 && m_buffer[i] == 0)
|
||||
if (m_buffer[i-1] == 0 && m_buffer[i] == 0)
|
||||
{
|
||||
eos_pos = i - 1;
|
||||
break;
|
||||
@ -186,7 +186,7 @@ namespace GameRes
|
||||
}
|
||||
else
|
||||
{
|
||||
eos_pos = Array.IndexOf<byte>(m_buffer, 0, start, length);
|
||||
eos_pos = Array.IndexOf<byte> (m_buffer, 0, start, length);
|
||||
}
|
||||
return eos_pos;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user