Limit the percentage of the progress indicator to reasonable values

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4096 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
hermens 18 years ago
parent 4275727d69
commit 9fa75ef4d1

@ -496,6 +496,8 @@ public class Network {
int percent=(int)((float)(myValue-prevValue)/(float)(nextValue-prevValue)*100);
long indexdiff=nextValue-myValue;
long ppmdiff=myPPM-nextPPM;
if (percent < 0) percent = -1;
if (percent > 100) percent = 101;
prop.put("table_progressbar", 1); //display the bar
prop.put("table_progressbar_percent", percent);
prop.put("table_progressbar_percent2", 100-percent);

Loading…
Cancel
Save