From f216f8b1425e4caa23d9c6e0a47cd6ee7b9c3c04 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Tue, 2 Feb 2010 01:09:45 +0100 Subject: [PATCH] Corretto possibile problema di overflow. --- Protocol.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Protocol.cs b/Protocol.cs index 60a6c5d..9b20b2d 100644 --- a/Protocol.cs +++ b/Protocol.cs @@ -302,7 +302,8 @@ namespace Dizzy { if(message != "") Console.WriteLine(message); - this.tasks.SetProgress(this.iter, 100 * transferredBytes / totalBytes); + int perc = transferredBytes / (totalBytes / 100); + this.tasks.SetProgress(this.iter, perc); } public void OnTransferStopped (string src, string dest, int transferredBytes, -- 2.1.4