From 52e4d10c80d37a52a9fccf179a6a133a0fb3321a Mon Sep 17 00:00:00 2001 From: brianmario Date: Wed, 18 Jul 2007 19:29:07 +0000 Subject: [PATCH] WinGui: quick bugfix to progress bar git-svn-id: svn://localhost/HandBrake/trunk@712 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/frmReadDVD.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs index eaecf823..c8103c34 100644 --- a/win/C#/frmReadDVD.cs +++ b/win/C#/frmReadDVD.cs @@ -80,7 +80,12 @@ namespace Handbrake this.BeginInvoke(new Parsing.ScanProgressEventHandler(Parser_OnScanProgress), new object[] { Sender, CurrentTitle, TitleCount }); return; } - this.scanProgress.Value = Convert.ToInt32(Convert.ToDouble(CurrentTitle) / Convert.ToDouble(TitleCount) * 100) + 1; + int progress = Convert.ToInt32(Convert.ToDouble(CurrentTitle) / Convert.ToDouble(TitleCount) * 100) + 1; + if (progress > 100) + { + progress = 100; + } + this.scanProgress.Value = progress; } } -- 2.11.0