mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-25 04:14:13 +08:00
(ArcView.Frame.AsciiEqual): do pointer arithmetic outside of loop.
This commit is contained in:
parent
310cb5fd2e
commit
0f6da36925
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user