From 1faba9fcb24db67765509f4f7113a6ff0b2e3131 Mon Sep 17 00:00:00 2001 From: Nicolas Thiolliere <thiollie@nanpc193.in2p3.fr> Date: Thu, 9 Jun 2016 14:11:12 +0200 Subject: [PATCH] In Scenario.cxx:: OldProgressPrintout Scenario.cxx:: ProgressPrintout : added (double) before year variable ton convert to double. Otherwise, infinite loop in progress bar for scenario with total time lower than one year. --- source/src/Scenario.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/src/Scenario.cxx b/source/src/Scenario.cxx index 81b6c9d6d..40b086526 100755 --- a/source/src/Scenario.cxx +++ b/source/src/Scenario.cxx @@ -675,8 +675,8 @@ void Scenario::Evolution(cSecond t) //________________________________________________________________________ void Scenario::OldProgressPrintout(cSecond t) { - double Time = (fAbsoluteTime-fStartingTime)/cYear ; - double Total = (t-fStartingTime)/cYear; + double Time = (fAbsoluteTime-fStartingTime)/(double)cYear ; + double Total = (t-fStartingTime)/(double)cYear; // Reset the line for(int i = 0; i < 10; i++) @@ -701,8 +701,8 @@ void Scenario::OldProgressPrintout(cSecond t) //________________________________________________________________________ void Scenario::ProgressPrintout(cSecond t) { - double Time = (fAbsoluteTime-fStartingTime)/cYear ; - double Total = (t-fStartingTime)/cYear; + double Time = (fAbsoluteTime-fStartingTime)/(double)cYear ; + double Total = (t-fStartingTime)/(double)cYear; if(fOldProgressBar) OldProgressPrintout(t); -- GitLab