Commit 9c2528a7 by Oliver Woodman

Correctly handle reading 0 bits

parent 85445536
......@@ -155,6 +155,9 @@ public final class ParsableBitArray {
* @return An integer whose bottom n bits hold the read data.
*/
public int readBits(int numBits) {
if (numBits == 0) {
return 0;
}
int returnValue = 0;
bitOffset += numBits;
while (bitOffset > 8) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment