Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1876 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Mar 10, 2006
1 parent b3df5ce commit 69d2604
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/de/anomic/kelondro/kelondroMScoreCluster.java
Expand Up @@ -97,7 +97,7 @@ public static int string2score(String s) {
}
// fix out-of-ranges
if (l > Integer.MAX_VALUE) return Integer.MAX_VALUE;
if (l < Integer.MIN_VALUE) return Integer.MIN_VALUE;
if (l < 0) return 0;
return (int) l;
} catch (Exception e) {
// try it lex
Expand All @@ -109,6 +109,8 @@ public static int string2score(String s) {
c += plainByteArray[(byte) s.charAt(i)];
}
for (int i = len; i < 5; i++) c <<= 6;
if (c > Integer.MAX_VALUE) return Integer.MAX_VALUE;
if (c < 0) return 0;
return c;
}
}
Expand Down

0 comments on commit 69d2604

Please sign in to comment.