diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-15 04:53:47 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-15 04:53:47 +0000 |
commit | 37a4d8dbbbf7d8c4ed368a65ce3e9308262aa1f6 (patch) | |
tree | f7944f04908289e8b3805d3b9fdcceee8241b417 /include/llvm/Bitcode/BitstreamReader.h | |
parent | dd9f52399740195ab27b3d8bbebe6888265c03fa (diff) |
Allow jumping to the end of a bitstream while reading
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode/BitstreamReader.h')
-rw-r--r-- | include/llvm/Bitcode/BitstreamReader.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h index d738628efb..7ff4e26fd8 100644 --- a/include/llvm/Bitcode/BitstreamReader.h +++ b/include/llvm/Bitcode/BitstreamReader.h @@ -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; |