From a39a773489300ab932c06ed3cf8b7024863fc24d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 20 Jan 2014 06:48:42 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/algorithms/bits/Bits.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/algorithms/bits/Bits.java b/src/algorithms/bits/Bits.java index 24ec464..8f794e3 100644 --- a/src/algorithms/bits/Bits.java +++ b/src/algorithms/bits/Bits.java @@ -236,11 +236,10 @@ public class Bits value -= (value >> 1) & £{L1}; value = (£{T})((value & £{L2}) + ((value >> 2) & £{L2})); - value = (value + (value >> 4)) & £{L3}; - value = (value * £{L4}) >> (($S - 1) * 8); + value = (£{T})((value + (value >> 4)) & £{L3}); + value = (£{T})((value * £{L4}) >> ((£{S} - 1) * 8)); return value; /* Only applicable upto 128 bits */ } - £>done } -- cgit v1.2.3-70-g09d2