From 60c925b59b31237cf50bb4948bfe40be75e8ba3a Mon Sep 17 00:00:00 2001 From: erri120 Date: Tue, 25 Feb 2020 11:58:22 +0100 Subject: [PATCH 1/2] Fixed ArgumentException in Octodiff Reporter --- Wabbajack.Common/OctoDiff.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Wabbajack.Common/OctoDiff.cs b/Wabbajack.Common/OctoDiff.cs index 132beb0d..b2ef53e9 100644 --- a/Wabbajack.Common/OctoDiff.cs +++ b/Wabbajack.Common/OctoDiff.cs @@ -32,6 +32,8 @@ namespace Wabbajack.Common { public void ReportProgress(string operation, long currentPosition, long total) { + if (currentPosition >= total) + return; Utils.Status(operation, new Percent(total, currentPosition)); } } From 4198ec0d64fd7cc56456b38cf82e8f9d96930104 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Tue, 25 Feb 2020 06:27:50 -0700 Subject: [PATCH 2/2] Add a few other checks --- Wabbajack.Common/OctoDiff.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Wabbajack.Common/OctoDiff.cs b/Wabbajack.Common/OctoDiff.cs index b2ef53e9..98c61041 100644 --- a/Wabbajack.Common/OctoDiff.cs +++ b/Wabbajack.Common/OctoDiff.cs @@ -32,7 +32,7 @@ namespace Wabbajack.Common { public void ReportProgress(string operation, long currentPosition, long total) { - if (currentPosition >= total) + if (currentPosition >= total || total < 1 || currentPosition < 0) return; Utils.Status(operation, new Percent(total, currentPosition)); }