diff options
author | Mike Buland <eichlan@xagasoft.com> | 2019-08-16 22:05:34 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2019-08-16 22:05:34 -0700 |
commit | 34709898f4fe108779a10ca7d37dc2f4197a65cd (patch) | |
tree | 8e87290062c3583eb7b110cc38126fe2990fc234 /src/unstable/blob.cpp | |
parent | 238244337283a7f888cf49a1e56b809c22466a63 (diff) | |
download | libbu++-34709898f4fe108779a10ca7d37dc2f4197a65cd.tar.gz libbu++-34709898f4fe108779a10ca7d37dc2f4197a65cd.tar.bz2 libbu++-34709898f4fe108779a10ca7d37dc2f4197a65cd.tar.xz libbu++-34709898f4fe108779a10ca7d37dc2f4197a65cd.zip |
Blob defaulted to an invalid size.
This broke a lot of operations, and was stupid.
Diffstat (limited to '')
-rw-r--r-- | src/unstable/blob.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/unstable/blob.cpp b/src/unstable/blob.cpp index 9abfede..3395fae 100644 --- a/src/unstable/blob.cpp +++ b/src/unstable/blob.cpp | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | Bu::Blob::Blob() : | 15 | Bu::Blob::Blob() : |
16 | pData( 0 ), | 16 | pData( 0 ), |
17 | iSize( -1 ) | 17 | iSize( 0 ) |
18 | { | 18 | { |
19 | } | 19 | } |
20 | 20 | ||
@@ -56,7 +56,7 @@ Bu::Blob::Blob( const void *pSrc, int32_t iSize ) : | |||
56 | 56 | ||
57 | Bu::Blob::Blob( const Bu::Blob::const_iterator &iStart ) : | 57 | Bu::Blob::Blob( const Bu::Blob::const_iterator &iStart ) : |
58 | pData( 0 ), | 58 | pData( 0 ), |
59 | iSize( -1 ) | 59 | iSize( 0 ) |
60 | { | 60 | { |
61 | if( !iStart ) | 61 | if( !iStart ) |
62 | return; | 62 | return; |
@@ -69,7 +69,7 @@ Bu::Blob::Blob( const Bu::Blob::const_iterator &iStart ) : | |||
69 | Bu::Blob::Blob( const Bu::Blob::const_iterator &iStart, | 69 | Bu::Blob::Blob( const Bu::Blob::const_iterator &iStart, |
70 | const Bu::Blob::const_iterator &iEnd ) : | 70 | const Bu::Blob::const_iterator &iEnd ) : |
71 | pData( 0 ), | 71 | pData( 0 ), |
72 | iSize( -1 ) | 72 | iSize( 0 ) |
73 | { | 73 | { |
74 | if( !iStart ) | 74 | if( !iStart ) |
75 | return; | 75 | return; |
@@ -91,7 +91,7 @@ Bu::Blob::~Blob() | |||
91 | { | 91 | { |
92 | delete[] pData; | 92 | delete[] pData; |
93 | pData = 0; | 93 | pData = 0; |
94 | iSize = -1; | 94 | iSize = 0; |
95 | } | 95 | } |
96 | 96 | ||
97 | int32_t Bu::Blob::getSize() const | 97 | int32_t Bu::Blob::getSize() const |