summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Support/raw_ostream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index 008f85603eea..72aa1d33bc92 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -175,7 +175,7 @@ raw_ostream &raw_ostream::operator<<(const format_object_base &Fmt) {
unsigned BytesUsed = Fmt.print(&V[0], NextBufferSize);
// If BytesUsed fit into the vector, we win.
- if (BytesUsed < NextBufferSize)
+ if (BytesUsed <= NextBufferSize)
return write(&V[0], BytesUsed);
// Otherwise, try again with a new size.