1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Allow jumping to the end of a bitstream while reading

llvm-svn: 69145
This commit is contained in:
Douglas Gregor 2009-04-15 04:53:47 +00:00
parent 4153589196
commit 8965c485d7

View File

@ -122,7 +122,7 @@ public:
void JumpToBit(uint64_t BitNo) {
uintptr_t ByteNo = uintptr_t(BitNo/8) & ~3;
uintptr_t WordBitNo = uintptr_t(BitNo) & 31;
assert(ByteNo < (uintptr_t)(LastChar-FirstChar) && "Invalid location");
assert(ByteNo <= (uintptr_t)(LastChar-FirstChar) && "Invalid location");
// Move the cursor to the right word.
NextChar = FirstChar+ByteNo;