[llvm] r174803 - Fix a nasty off-by one error that only manifests with 64-bit word size (which is

Chris Lattner sabre at nondot.org
Fri Feb 8 23:37:26 PST 2013


Author: lattner
Date: Sat Feb  9 01:37:26 2013
New Revision: 174803

URL: http://llvm.org/viewvc/llvm-project?rev=174803&view=rev
Log:
Fix a nasty off-by one error that only manifests with 64-bit word size (which is
not enabled yet).

Modified:
    llvm/trunk/include/llvm/Bitcode/BitstreamReader.h

Modified: llvm/trunk/include/llvm/Bitcode/BitstreamReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/BitstreamReader.h?rev=174803&r1=174802&r2=174803&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Bitcode/BitstreamReader.h (original)
+++ llvm/trunk/include/llvm/Bitcode/BitstreamReader.h Sat Feb  9 01:37:26 2013
@@ -334,7 +334,7 @@ public:
 
     // Skip over any bits that are already consumed.
     if (WordBitNo) {
-      if (sizeof(word_t) > 4)
+      if (sizeof(word_t) >= 4)
         Read64(WordBitNo);
       else
         Read(WordBitNo);





More information about the llvm-commits mailing list