Skip to content

Commit

Permalink
Correct upper bound in for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
tedyu committed May 6, 2015
1 parent b51dcaf commit 1719c5b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static boolean anySet(Object baseObject, long baseOffset, long bitSetWidt
assert bitSetWidthInBytes % WORD_SIZE == 0;
int widthInLong = (int)(bitSetWidthInBytes / WORD_SIZE);
long addr = baseOffset;
for (int i = 0; i <= widthInLong; i++, addr += WORD_SIZE) {
for (int i = 0; i < widthInLong; i++, addr += WORD_SIZE) {
if (PlatformDependent.UNSAFE.getLong(baseObject, addr) != 0) {
return true;
}
Expand Down

0 comments on commit 1719c5b

Please sign in to comment.