diff options
-rw-r--r-- | lib/Transforms/IPO/SimplifyLibCalls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp index a3be345..8aed1e8 100644 --- a/lib/Transforms/IPO/SimplifyLibCalls.cpp +++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp @@ -780,7 +780,7 @@ public: // do the concatenation for us. Value *MemcpyOps[] = { Dst, Src, - ConstantInt::get(SLC.getIntPtrType(), SrcLen), // length including nul. + ConstantInt::get(SLC.getIntPtrType(), SrcLen+1), // length including nul. ConstantInt::get(Type::Int32Ty, 1) // alignment }; new CallInst(SLC.get_memcpy(), MemcpyOps, 4, "", CI); |