From 5cf8c66f06cd712137e36d54dcd9b5360cce5f88 Mon Sep 17 00:00:00 2001 From: Ryan Kistner Date: Fri, 12 Jun 2015 20:52:15 -0600 Subject: [PATCH] Longer integer for chunk math. Int32 overflow when calculating file diff --- DepotDownloader/ContentDownloader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index b7f2b8bf..a905130d 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -792,7 +792,7 @@ namespace DepotDownloader } else { - size_downloaded += (file.TotalSize - (ulong)neededChunks.Select(x => (int)x.UncompressedLength).Sum()); + size_downloaded += (file.TotalSize - (ulong)neededChunks.Select(x => (long)x.UncompressedLength).Sum()); } }