diff --git a/GameRes/ArcStream.cs b/GameRes/ArcStream.cs index 47c9b35e..72482ad7 100644 --- a/GameRes/ArcStream.cs +++ b/GameRes/ArcStream.cs @@ -362,7 +362,7 @@ namespace GameRes } var current_pos = Position; if (0 == count || current_pos >= m_size) - return new byte[0]; + return Array.Empty(); var bytes = m_view.ReadBytes (m_start+current_pos, (uint)Math.Min (count, m_size - current_pos)); Position = current_pos + bytes.Length; return bytes; diff --git a/GameRes/BinaryStream.cs b/GameRes/BinaryStream.cs index 1cfa8cc2..3a7ca08b 100644 --- a/GameRes/BinaryStream.cs +++ b/GameRes/BinaryStream.cs @@ -482,7 +482,7 @@ namespace GameRes { m_source = input.GetBuffer(); if (null == m_source) - m_source = new byte[0]; + m_source = Array.Empty(); } catch (UnauthorizedAccessException) {