(ArcView.Frame.AsciiEqual): do pointer arithmetic outside of loop.

This commit is contained in:
morkt 2016-12-27 22:48:33 +04:00
parent 310cb5fd2e
commit 0f6da36925

View File

@ -327,11 +327,11 @@ namespace GameRes
return false; return false;
unsafe unsafe
{ {
byte* ptr = m_view.GetPointer (m_offset); byte* ptr = m_view.GetPointer (m_offset) + (offset - m_offset);
try { try {
for (int i = 0; i < data.Length; ++i) for (int i = 0; i < data.Length; ++i)
{ {
if (ptr[offset-m_offset+i] != data[i]) if (ptr[i] != data[i])
return false; return false;
} }
} finally { } finally {