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