diff options
author | Mike Buland <eichlan@xagasoft.com> | 2019-09-22 09:43:17 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2019-09-22 09:43:17 -0700 |
commit | d5098782e5645d39b5e92f150e187e7194ef055a (patch) | |
tree | 90dc4c851cf645c9c59cb0283fef8d1936221bba /src/unstable | |
parent | 34709898f4fe108779a10ca7d37dc2f4197a65cd (diff) | |
download | libbu++-d5098782e5645d39b5e92f150e187e7194ef055a.tar.gz libbu++-d5098782e5645d39b5e92f150e187e7194ef055a.tar.bz2 libbu++-d5098782e5645d39b5e92f150e187e7194ef055a.tar.xz libbu++-d5098782e5645d39b5e92f150e187e7194ef055a.zip |
Blob substr constructor includes null terminator.
Diffstat (limited to 'src/unstable')
-rw-r--r-- | src/unstable/blob.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/unstable/blob.cpp b/src/unstable/blob.cpp index 3395fae..69ec28f 100644 --- a/src/unstable/blob.cpp +++ b/src/unstable/blob.cpp | |||
@@ -85,6 +85,7 @@ Bu::Blob::Blob( const Bu::Blob::const_iterator &iStart, | |||
85 | 85 | ||
86 | pData = new char[iSize+1]; | 86 | pData = new char[iSize+1]; |
87 | memcpy( pData, iStart.pBlob->pData+iStart.iIndex, iSize ); | 87 | memcpy( pData, iStart.pBlob->pData+iStart.iIndex, iSize ); |
88 | pData[iSize] = 0; | ||
88 | } | 89 | } |
89 | 90 | ||
90 | Bu::Blob::~Blob() | 91 | Bu::Blob::~Blob() |