diff --git a/ArcFormats/ImageRCT.cs b/ArcFormats/ImageRCT.cs index 19ba24ab..c97de9c8 100644 --- a/ArcFormats/ImageRCT.cs +++ b/ArcFormats/ImageRCT.cs @@ -121,7 +121,7 @@ namespace GameRes.Formats.Majiro if (null == meta) throw new ArgumentException ("RctFormat.Read should be supplied with RctMetaData", "info"); byte[] base_image = null; - if (meta.AddSize > 0 && OverlayFrames) + if (meta.FileName != null && meta.AddSize > 0 && OverlayFrames) base_image = ReadBaseImage (file, meta); file.Position = meta.DataOffset + meta.AddSize; @@ -169,6 +169,8 @@ namespace GameRes.Formats.Majiro try { string name = Encodings.cp932.GetString (name_bin, 0, name_bin.Length-1); + string dir_name = Path.GetDirectoryName (meta.FileName); + name = Path.Combine (dir_name, name); if (File.Exists (name)) { using (var base_file = File.OpenRead (name)) @@ -177,6 +179,7 @@ namespace GameRes.Formats.Majiro if (null != base_info && 0 == base_info.AddSize && meta.Width == base_info.Width && meta.Height == base_info.Height) { + base_info.FileName = name; base_file.Position = base_info.DataOffset; Stream input = base_file; if (base_info.IsEncrypted) diff --git a/ArcFormats/Properties/AssemblyInfo.cs b/ArcFormats/Properties/AssemblyInfo.cs index 4a13c9ea..05a89c5d 100644 --- a/ArcFormats/Properties/AssemblyInfo.cs +++ b/ArcFormats/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion ("1.1.9.92")] -[assembly: AssemblyFileVersion ("1.1.9.92")] +[assembly: AssemblyVersion ("1.1.9.93")] +[assembly: AssemblyFileVersion ("1.1.9.93")]