fix off by one error.

llvm-svn: 49766
This commit is contained in:
Chris Lattner 2008-04-16 04:10:37 +00:00
parent ee61054d00
commit 08623f21ae
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ public:
SmallString &append_uint_32(uint32_t N) { SmallString &append_uint_32(uint32_t N) {
char Buffer[20]; char Buffer[20];
char *BufPtr = Buffer+19; char *BufPtr = Buffer+20;
if (N == 0) *--BufPtr = '0'; // Handle special case. if (N == 0) *--BufPtr = '0'; // Handle special case.
@ -73,7 +73,7 @@ public:
return append_uint_32(uint32_t(N)); return append_uint_32(uint32_t(N));
char Buffer[40]; char Buffer[40];
char *BufPtr = Buffer+39; char *BufPtr = Buffer+40;
if (N == 0) *--BufPtr = '0'; // Handle special case... if (N == 0) *--BufPtr = '0'; // Handle special case...