Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Limit the percentage of the progress indicator to reasonable values

hermens9fa75ef4d1cc
diff --git a/htroot/Network.java b/htroot/Network.java
index 80d9ab644..f14e4d8aa 100644
--- a/htroot/Network.java
+++ b/htroot/Network.java
@@ -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);