From 5ffdbcbbb3741fa535d10533ffcd630d9e367b28 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 23 Oct 2014 02:28:05 +0200 Subject: [PATCH] File count technically can't exceed uint.MaxValue/2 elements... --- src/addoncreator/Addon/AddonFile.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/addoncreator/Addon/AddonFile.cs b/src/addoncreator/Addon/AddonFile.cs index a2f8511..4af6005 100644 --- a/src/addoncreator/Addon/AddonFile.cs +++ b/src/addoncreator/Addon/AddonFile.cs @@ -291,11 +291,13 @@ namespace GarrysMod.AddonCreator.Addon sw.Write(Version); // File list +#if SUPPORT_BIG if (Files.Count > uint.MaxValue) { throw new IndexOutOfRangeException("Number of addon files must not exceed " + uint.MaxValue + " elements."); } +#endif uint fileNum = 0; foreach (var file in resultingFiles) {