From 8965c485d72d38ae5834b38720ccb118c452fa1e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 15 Apr 2009 04:53:47 +0000 Subject: [PATCH] Allow jumping to the end of a bitstream while reading llvm-svn: 69145 --- include/llvm/Bitcode/BitstreamReader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h index d738628efbd..7ff4e26fd8c 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;