From fc724ee4c76bc97f536ff06675d2f83db01e8ed8 Mon Sep 17 00:00:00 2001 From: morkt Date: Wed, 17 Feb 2016 11:49:05 +0400 Subject: [PATCH] (NoaOpener): recognize ancient RSA archives. --- ArcFormats/Entis/ArcNOA.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ArcFormats/Entis/ArcNOA.cs b/ArcFormats/Entis/ArcNOA.cs index 77676437..391a4a1d 100644 --- a/ArcFormats/Entis/ArcNOA.cs +++ b/ArcFormats/Entis/ArcNOA.cs @@ -76,7 +76,7 @@ namespace GameRes.Formats.Entis public NoaOpener () { - Extensions = new string[] { "noa", "dat" }; + Extensions = new string[] { "noa", "dat", "rsa" }; } public static Dictionary> KnownKeys = @@ -118,7 +118,7 @@ namespace GameRes.Formats.Entis public override Stream OpenEntry (ArcFile arc, Entry entry) { var nent = entry as NoaEntry; - if (null == nent || !arc.File.View.AsciiEqual (entry.Offset, "filedata")) + if (null == nent) return arc.File.CreateStream (entry.Offset, entry.Size); ulong size = arc.File.View.ReadUInt64 (entry.Offset+8); if (size > int.MaxValue) @@ -264,8 +264,8 @@ namespace GameRes.Formats.Entis dir_offset += 4; if (extra_length > 0 && 0 == (entry.Attr & 0x70)) { - entry.Extra = new byte[extra_length]; - if (entry.Extra.Length != m_file.View.Read (dir_offset, entry.Extra, 0, extra_length)) + entry.Extra = m_file.View.ReadBytes (dir_offset, extra_length); + if (entry.Extra.Length != extra_length) return false; } dir_offset += extra_length;