From 999fd3aceff099719dfd36a9cd7fdcfca1483887 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 27 Feb 2012 20:31:47 +0000 Subject: [PATCH] Fix PR12089 http://llvm.org/bugs/show_bug.cgi?id=12089 llvm-svn: 151550 --- include/llvm/Support/StreamableMemoryObject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/Support/StreamableMemoryObject.h b/include/llvm/Support/StreamableMemoryObject.h index c73e03a3f7a..ab480864d0f 100644 --- a/include/llvm/Support/StreamableMemoryObject.h +++ b/include/llvm/Support/StreamableMemoryObject.h @@ -153,7 +153,7 @@ private: 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;