From a70cc6a25182fe87e6573e2eee0efc8c3b35e1f6 Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 2 Jan 2018 06:20:14 +0400 Subject: [PATCH] (UsfOpener): additional sanity check. --- Legacy/WestGate/ArcUSF.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Legacy/WestGate/ArcUSF.cs b/Legacy/WestGate/ArcUSF.cs index 1b50f690..73578987 100644 --- a/Legacy/WestGate/ArcUSF.cs +++ b/Legacy/WestGate/ArcUSF.cs @@ -45,7 +45,7 @@ namespace GameRes.Formats.WestGate public override ArcFile TryOpen (ArcView file) { uint first_offset = file.View.ReadUInt32 (0xC); - if (first_offset >= file.MaxOffset) + if (first_offset >= file.MaxOffset || 0 != (first_offset & 0xF)) return null; int count = (int)(first_offset / 0x10); if (!IsSaneCount (count))