From 6e3124d6aec9d4ad9fbe92beec82add5e1a811fe Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 15 Apr 2022 08:46:54 -0700 Subject: Augments to Blob and BlobBuilder. You can construct a BlobBuilder from a Blob now, and Blob has an extra null byte of padding just in case you use a Blob to store a string. --- src/unstable/blob.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/unstable/blob.cpp') diff --git a/src/unstable/blob.cpp b/src/unstable/blob.cpp index 69ec28f..e72e265 100644 --- a/src/unstable/blob.cpp +++ b/src/unstable/blob.cpp @@ -31,9 +31,10 @@ Bu::Blob::Blob( const class BlobBuilder &rSrc ) : iSize( 0 ) { iSize = rSrc.getSize(); - pData = new char[iSize]; + pData = new char[iSize+1]; rSrc.copyTo( pData, iSize ); + pData[iSize] = '\0'; } Bu::Blob::Blob( const char *pSrc ) : -- cgit v1.2.3