From 7b8b69e30e9f21a4caf14efd2b9bb49661bc9ceb Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 17 Dec 2016 18:53:11 +0400 Subject: [PATCH] (IphFormat.ReadMetaData): fixed. --- ArcFormats/TechnoBrain/ImageIPH.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ArcFormats/TechnoBrain/ImageIPH.cs b/ArcFormats/TechnoBrain/ImageIPH.cs index 6997d16d..6ae2aaa5 100644 --- a/ArcFormats/TechnoBrain/ImageIPH.cs +++ b/ArcFormats/TechnoBrain/ImageIPH.cs @@ -49,12 +49,13 @@ namespace GameRes.Formats.TechnoBrain // 'RIFF' isn't included into signature to avoid auto-detection of the WAV files as IPH images. if (0x46464952 != file.Signature) // 'RIFF' return null; - if (0x38 != file.ReadInt32()) + var header = file.ReadHeader (0x10); + if (0x38 != header.ToInt32 (4)) return null; - var signature = file.ReadInt32(); + var signature = header.ToInt32 (8); if (signature != 0x20485049 && signature != 0x00485049) // 'IPH' return null; - if (0x20746D66 != file.ReadInt32()) // 'fmt ' + if (0x20746D66 != header.ToInt32 (12)) // 'fmt ' return null; file.Position = 0x38; if (0x20706D62 != file.ReadInt32()) // 'bmp '