From 036a94ed61da276c23b59362fc586248d1d4289d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 16 Apr 2008 04:10:37 +0000 Subject: [PATCH] fix off by one error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49766 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/SmallString.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/ADT/SmallString.h b/include/llvm/ADT/SmallString.h index afcaafb293c..9be654ee7e1 100644 --- a/include/llvm/ADT/SmallString.h +++ b/include/llvm/ADT/SmallString.h @@ -56,7 +56,7 @@ public: SmallString &append_uint_32(uint32_t N) { char Buffer[20]; - char *BufPtr = Buffer+19; + char *BufPtr = Buffer+20; if (N == 0) *--BufPtr = '0'; // Handle special case. @@ -73,7 +73,7 @@ public: return append_uint_32(uint32_t(N)); char Buffer[40]; - char *BufPtr = Buffer+39; + char *BufPtr = Buffer+40; if (N == 0) *--BufPtr = '0'; // Handle special case... -- 2.34.1