From ff56fbf19f7ddf2d0af2b84c0e466ebf92a2b37e Mon Sep 17 00:00:00 2001 From: David Daney Date: Tue, 10 May 2005 00:48:49 +0000 Subject: [PATCH] BitSet.java (get(int, int)): Fix breakage when requested set doesn't start on a multiple of 64. 2005-05-09 David Daney * java/util/BitSet.java (get(int, int)): Fix breakage when requested set doesn't start on a multiple of 64. From-SVN: r99492 --- libjava/ChangeLog | 5 +++++ libjava/java/util/BitSet.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d6b156a90cc6..114bd0ec2c6f 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2005-05-09 David Daney + + * java/util/BitSet.java (get(int, int)): Fix breakage when + requested set doesn't start on a multiple of 64. + 2005-05-07 Matthias Klose * gnu/java/awt/peer/gtk/GtkVolatileImage.java: Add imports. diff --git a/libjava/java/util/BitSet.java b/libjava/java/util/BitSet.java index cf7a83ed083d..d6822d9fb909 100644 --- a/libjava/java/util/BitSet.java +++ b/libjava/java/util/BitSet.java @@ -380,7 +380,7 @@ public class BitSet implements Cloneable, Serializable } int len = Math.min(hi_offset, bits.length - 1); - int reverse = ~lo_bit; + int reverse = 64 - lo_bit; int i; for (i = 0; lo_offset < len; lo_offset++, i++) bs.bits[i] = ((bits[lo_offset] >>> lo_bit)