From 9cdb4f0efe550df46ccd4035b57335db8015284a Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 11 Aug 2015 07:08:19 +0400 Subject: [PATCH] (IndexReader.ReadIndex): don't try to open *.ari index as archive body. --- ArcFormats/ArcKaguya.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArcFormats/ArcKaguya.cs b/ArcFormats/ArcKaguya.cs index bff6db5f..89ca531e 100644 --- a/ArcFormats/ArcKaguya.cs +++ b/ArcFormats/ArcKaguya.cs @@ -84,7 +84,7 @@ namespace GameRes.Formats.Kaguya { string ari_name = Path.ChangeExtension (file.Name, "ari"); List dir = null; - if (File.Exists (ari_name)) + if (file.Name != ari_name && File.Exists (ari_name)) dir = ReadAriIndex (file, ari_name); if (null == dir || 0 == dir.Count) dir = BuildIndex (file); @@ -269,7 +269,7 @@ namespace GameRes.Formats.Kaguya return -1; m_curbit = 0; } - return 0 == (m_curbyte & (1 << (7 - m_curbit++))) ? 0 : 1; + return (m_curbyte >> (7 - m_curbit++)) & 1; } } }