From 489a00cf7b634470df791048d1475022ac634151 Mon Sep 17 00:00:00 2001 From: morkt Date: Thu, 3 Sep 2015 17:15:39 +0400 Subject: [PATCH] (ArchiveFileSystem): check archive directory for duplicates. --- GameRes/FileSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GameRes/FileSystem.cs b/GameRes/FileSystem.cs index ee1f89b4..94e6c1e8 100644 --- a/GameRes/FileSystem.cs +++ b/GameRes/FileSystem.cs @@ -185,7 +185,8 @@ namespace GameRes m_dir = new Dictionary (arc.Dir.Count, StringComparer.InvariantCultureIgnoreCase); foreach (var entry in arc.Dir) { - m_dir.Add (entry.Name, entry); + if (!m_dir.ContainsKey (entry.Name)) + m_dir.Add (entry.Name, entry); } }