[llvm-commits] [llvm] r151550 - /llvm/trunk/include/llvm/Support/StreamableMemoryObject.h

Derek Schuff dschuff at google.com
Mon Feb 27 12:31:47 PST 2012


Author: dschuff
Date: Mon Feb 27 14:31:47 2012
New Revision: 151550

URL: http://llvm.org/viewvc/llvm-project?rev=151550&view=rev
Log:
Fix PR12089
http://llvm.org/bugs/show_bug.cgi?id=12089


Modified:
    llvm/trunk/include/llvm/Support/StreamableMemoryObject.h

Modified: llvm/trunk/include/llvm/Support/StreamableMemoryObject.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/StreamableMemoryObject.h?rev=151550&r1=151549&r2=151550&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/StreamableMemoryObject.h (original)
+++ llvm/trunk/include/llvm/Support/StreamableMemoryObject.h Mon Feb 27 14:31:47 2012
@@ -153,7 +153,7 @@
   bool fetchToPos(size_t Pos) {
     if (EOFReached) return Pos < ObjectSize;
     while (Pos >= BytesRead) {
-      Bytes.resize(BytesRead + kChunkSize);
+      Bytes.resize(BytesRead + BytesSkipped + kChunkSize);
       size_t bytes = Streamer->GetBytes(&Bytes[BytesRead + BytesSkipped],
                                         kChunkSize);
       BytesRead += bytes;





More information about the llvm-commits mailing list