提交 13b30fae authored 作者: Thomas Mueller's avatar Thomas Mueller

BitField bugfix

上级 21c10b84
...@@ -19,7 +19,7 @@ public class BitField { ...@@ -19,7 +19,7 @@ public class BitField {
/** /**
* Get the index of the last bit that is set. * Get the index of the last bit that is set.
* *
* @return the index of the last enabled bit * @return the index of the last enabled bit, or -1
*/ */
public int getLastSetBit() { public int getLastSetBit() {
int i = (data.length << ADDRESS_BITS) - 1; int i = (data.length << ADDRESS_BITS) - 1;
...@@ -76,7 +76,7 @@ public class BitField { ...@@ -76,7 +76,7 @@ public class BitField {
} }
} }
} }
return fromIndex; return max << ADDRESS_BITS;
} }
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论