Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix for division by zero
Michael Peter Christen9938c8137840
diff --git a/htroot/yacysearchtrailer.java b/htroot/yacysearchtrailer.javaindex a0f39d297..5db301000 100644--- a/htroot/yacysearchtrailer.java+++ b/htroot/yacysearchtrailer.java@@ -320,7 +320,7 @@ public class yacysearchtrailer {prop.put(fileType, "nav-topics_element_" + i + "_name", name);prop.put(fileType, "nav-topics_element_" + i + "_url", QueryParams.navurl(fileType, 0, theSearch.query, name, false).toString());prop.put("nav-topics_element_" + i + "_count", count);- int fontsize = TOPWORDS_MINSIZE + (TOPWORDS_MAXSIZE - TOPWORDS_MINSIZE) * (count - mincount) / (maxcount - mincount);+ int fontsize = TOPWORDS_MINSIZE + (TOPWORDS_MAXSIZE - TOPWORDS_MINSIZE) * (count - mincount) / (1 + maxcount - mincount);fontsize = Math.max(TOPWORDS_MINSIZE, fontsize - (name.length() - 5));prop.put("nav-topics_element_" + i + "_size", fontsize); // font size in pixelprop.put("nav-topics_element_" + i + "_nl", 1);