Author: j16sdiz
Date: 2008-05-15 05:05:36 +0000 (Thu, 15 May 2008)
New Revision: 19937

Modified:
   
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
Bad math in keyToLong()


Modified: 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
--- 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java  
    2008-05-15 00:42:18 UTC (rev 19936)
+++ 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java  
    2008-05-15 05:05:36 UTC (rev 19937)
@@ -1296,11 +1296,12 @@
        private long keyToLong(byte[] key) {
                return (((long) (key[0]) << 0) + //
                        (((long) key[1]) << 8) + //
-                       (((long) key[3]) << 16) + //
-                       (((long) key[4]) << 24) + //
-                       (((long) key[5]) << 32) + //
-                       (((long) key[6]) << 40) + //
-               (((long) key[7]) << 48));
+                       (((long) key[2]) << 16) + //
+                       (((long) key[3]) << 24) + //
+                       (((long) key[4]) << 32) + //
+                       (((long) key[5]) << 40) + //
+                               (((long) key[6]) << 48) + //
+                               (((long) key[7]) << 56));
        }

        // ------------- Statistics (a.k.a. lies)


Reply via email to