llvm.org GIT mirror llvm / f22c0a1
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_24@58424 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 10 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
174174 unsigned BytesUsed = Fmt.print(&V[0], NextBufferSize);
175175
176176 // If BytesUsed fit into the vector, we win.
177 if (BytesUsed < NextBufferSize)
177 if (BytesUsed <= NextBufferSize)
178178 return write(&V[0], BytesUsed);
179179
180180 // Otherwise, try again with a new size.