mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-12 12:59:28 +08:00
(VFS.FullPath): dispose enumerable iterator.
This commit is contained in:
parent
3e8718d6c3
commit
375e162959
@ -662,14 +662,16 @@ 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;
|
||||||
|
using (var arc_iterator = m_vfs.ArcStack.Reverse().GetEnumerator())
|
||||||
|
{
|
||||||
while (i < desired_vfs_count - 1 && arc_iterator.MoveNext())
|
while (i < desired_vfs_count - 1 && arc_iterator.MoveNext())
|
||||||
{
|
{
|
||||||
if (arc_iterator.Current != desired[i])
|
if (arc_iterator.Current != desired[i])
|
||||||
break;
|
break;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
while (Count > i+1)
|
while (Count > i+1)
|
||||||
m_vfs.Pop();
|
m_vfs.Pop();
|
||||||
while (Count < desired_vfs_count)
|
while (Count < desired_vfs_count)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user