Skip to content

Commit

Permalink
Merge pull request #22 from AnimatedSwine37/master
Browse files Browse the repository at this point in the history
Fix cached files not being updated when one mod registers multiple sources for a file
  • Loading branch information
Sewer56 authored Sep 23, 2023
2 parents 705cdff + 3c1b48f commit 8d60cad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Persona.Merger.Common/Cache/MergedFileCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public unsafe bool TryGet(string key, Span<CachedFileSource> sources, [MaybeNull
cachedPath = null;
if (!KeyToFile.TryGetValue(key, out var value))
return false;
// Note: Checking length of 2 collections is not necessary, key uses character invalid
// in modIds, and thus should never have collisions where source count would be different.

if (sources.Length != value.Sources.Length)
return false;

// We write it this way however to elide bounds checks.
fixed (CachedFileSource* currentValueSource = &value.Sources[0])
Expand Down

0 comments on commit 8d60cad

Please sign in to comment.