Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in previousClearBit #15

Open
incaseoftrouble opened this issue Nov 7, 2018 · 1 comment
Open

Bug in previousClearBit #15

incaseoftrouble opened this issue Nov 7, 2018 · 1 comment

Comments

@incaseoftrouble
Copy link
Contributor

incaseoftrouble commented Nov 7, 2018

Hi,

while testing the 1.2 version I found the following issue:

SparseBitSet set = new SparseBitSet();
set.set(0);
set.set(64);
System.out.println(set.previousClearBit(64));
set.clear(0);
set.set(1);
System.out.println(set.previousClearBit(64));

Expected: (consistent with BitSet)

63
63

Got:

-1
0

@BrentDouglas

BrentDouglas added a commit to BrentDouglas/SparseBitSet that referenced this issue Nov 10, 2018
Currently it sets the length to the position of the needle in the first
word it looks up and only searches indices below that. This is incorrect
after the initial word where we need to search from the top.
BrentDouglas added a commit to BrentDouglas/SparseBitSet that referenced this issue Nov 10, 2018
Currently it sets the length to the position of the needle in the first
word it looks up and only searches indices below that. This is incorrect
after the initial word where we need to search from the top.
BrentDouglas added a commit to BrentDouglas/SparseBitSet that referenced this issue Nov 10, 2018
Currently it sets the length to the position of the needle in the first
word it looks up and only searches indices below that. This is incorrect
after the initial word where we need to search from the top.
BrentDouglas added a commit to BrentDouglas/SparseBitSet that referenced this issue Nov 10, 2018
Currently it sets the length to the position of the needle in the first
word it looks up and only searches indices below that. This is incorrect
after the initial word where we need to search from the top.
brettwooldridge pushed a commit that referenced this issue Nov 10, 2018
Currently it sets the length to the position of the needle in the first
word it looks up and only searches indices below that. This is incorrect
after the initial word where we need to search from the top.
@re-thc
Copy link

re-thc commented Mar 15, 2019

Hi, any chance of a new release with these fixes? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants