From 0a118f6911465537d483e46ddfc8be6bad73d1b9 Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 18 Dec 2015 13:32:18 +0400 Subject: [PATCH] (TryOpen): use IsSaneCount method. --- ArcFormats/NitroPlus/ArcSteinsGate.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArcFormats/NitroPlus/ArcSteinsGate.cs b/ArcFormats/NitroPlus/ArcSteinsGate.cs index 13cfb380..6258704b 100644 --- a/ArcFormats/NitroPlus/ArcSteinsGate.cs +++ b/ArcFormats/NitroPlus/ArcSteinsGate.cs @@ -68,7 +68,7 @@ namespace GameRes.Formats using (var header = new BinaryReader (stream)) { int entry_count = header.ReadInt32(); - if (entry_count <= 0) + if (!IsSaneCount (entry_count)) return null; index_size -= 4; int average_entry_size = index_size / entry_count;