perf: Improve FillBuffer

This commit is contained in:
Crsky
2026-03-20 00:57:46 +08:00
parent 69c1970747
commit 08895bdb1c

View File

@@ -1150,8 +1150,8 @@ namespace GameRes.Formats.KiriKiri
{ {
if (m_input.Position == m_input.Length) if (m_input.Position == m_input.Length)
return false; return false;
var v1 = m_input.ReadUInt16 (); var v1 = m_input.ReadInt32 ();
var v2 = m_input.ReadUInt16 (); var v2 = (int)((uint)v1 >> 16);
var input = m_input.ReadBytes (v2); var input = m_input.ReadBytes (v2);
if (v2 != input.Length) if (v2 != input.Length)
throw new EndOfStreamException (); throw new EndOfStreamException ();