Skip to content

Commit

Permalink
Update Package.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed Feb 14, 2024
1 parent fccc940 commit 964c70e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ValvePak/ValvePak/Package.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,9 @@ public PackageEntry FindEntry(string filePathStr)
return index < 0 ? default : entriesForExtension[index];
}

foreach (var entry in entriesForExtension)
for(var i = 0; i < entriesForExtension.Count; i++) // Don't use foreach
{
var entry = entriesForExtension[i];
if (directory.SequenceEqual(entry.DirectoryName) && fileName.SequenceEqual(entry.FileName))
{
return entry;
Expand Down

0 comments on commit 964c70e

Please sign in to comment.