mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-25 04:14:13 +08:00
(VFS.FullPath): dispose enumerable iterator.
This commit is contained in:
parent
3e8718d6c3
commit
375e162959
@ -662,13 +662,15 @@ namespace GameRes
|
|||||||
return;
|
return;
|
||||||
var desired = value.ToArray();
|
var desired = value.ToArray();
|
||||||
int desired_vfs_count = desired.Length;
|
int desired_vfs_count = desired.Length;
|
||||||
var arc_iterator = m_vfs.ArcStack.Reverse().GetEnumerator();
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (i < desired_vfs_count - 1 && arc_iterator.MoveNext())
|
using (var arc_iterator = m_vfs.ArcStack.Reverse().GetEnumerator())
|
||||||
{
|
{
|
||||||
if (arc_iterator.Current != desired[i])
|
while (i < desired_vfs_count - 1 && arc_iterator.MoveNext())
|
||||||
break;
|
{
|
||||||
++i;
|
if (arc_iterator.Current != desired[i])
|
||||||
|
break;
|
||||||
|
++i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while (Count > i+1)
|
while (Count > i+1)
|
||||||
m_vfs.Pop();
|
m_vfs.Pop();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user