fix for another BMP parser problem. This is not a bug, I guess it was caused by a corrupted graphics file.

see http://forum.yacy-websuche.de/viewtopic.php?f=6&t=180&hilit=&p=1017#p1017

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3995 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent 8ebfd732ce
commit bf6f6820ec

@ -172,25 +172,6 @@ public final class yacyVersion implements Comparator, Comparable {
return thisVersion;
}
public static final boolean shallRetrieveUpdateInfo() {
// according to update properties, decide if we should retrieve update information
// if true, the release that can be obtained is returned.
// if false, null is returned
plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();
// check if update process allowes update retrieve
String process = sb.getConfig("update.process", "manual");
if (process.equals("manual")) return false; // no, its a manual process
// check if the last retrieve time is a minimum time ago
long cycle = Math.max(1, sb.getConfigLong("update.cycle", 168)) * 60 * 60 * 1000; // update.cycle is hours
long timeLookup = sb.getConfigLong("update.time.lookup", System.currentTimeMillis());
if (timeLookup + cycle > System.currentTimeMillis()) return false; // no we have recently made a lookup
// ok, we may do a lookup
return true;
}
public static final yacyVersion rulebasedUpdateInfo(boolean manual) {
// according to update properties, decide if we should retrieve update information
// if true, the release that can be obtained is returned.

@ -75,6 +75,7 @@ public class ymageBMPParser {
}
public static final int DWORD(byte[] b, int offset) {
if (offset + 3 >= b.length) return 0;
int ret = ((int) b[offset + 3] & 0xff);
ret = (ret << 8) | ((int) b[offset + 2] & 0xff);
ret = (ret << 8) | ((int) b[offset + 1] & 0xff);

Loading…
Cancel
Save