From 57b0115d416de3ab50466db4677726c3b3df933c Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 11 Jul 2015 10:19:46 +0400 Subject: [PATCH] (ArchiveFormat.IsSaneCount): new static method. --- GameRes/GameRes.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GameRes/GameRes.cs b/GameRes/GameRes.cs index a6b7f009..c9d9e296 100644 --- a/GameRes/GameRes.cs +++ b/GameRes/GameRes.cs @@ -234,6 +234,11 @@ namespace GameRes return GetOptions (args.Options); } + + protected static bool IsSaneCount (int count) + { + return count > 0 && count < 0x20000; + } } public delegate void ParametersRequestEventHandler (object sender, ParametersRequestEventArgs e);