[llvm-commits] [llvm] r58424 - /llvm/branches/release_24/lib/Support/raw_ostream.cpp
Tanya Lattner
tonic at nondot.org
Wed Oct 29 23:00:18 PDT 2008
Author: tbrethou
Date: Thu Oct 30 01:00:18 2008
New Revision: 58424
URL: http://llvm.org/viewvc/llvm-project?rev=58424&view=rev
Log:
Merge from mainline.
fix PR2953, an off-by-one error handling formatted i/o.
Thanks to Török Edwin for the awesome reduced testcase.
Modified:
llvm/branches/release_24/lib/Support/raw_ostream.cpp
Modified: llvm/branches/release_24/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Support/raw_ostream.cpp?rev=58424&r1=58423&r2=58424&view=diff
==============================================================================
--- llvm/branches/release_24/lib/Support/raw_ostream.cpp (original)
+++ llvm/branches/release_24/lib/Support/raw_ostream.cpp Thu Oct 30 01:00:18 2008
@@ -175,7 +175,7 @@
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.
More information about the llvm-commits
mailing list